Answers for "postgres duration between two dates in months"

SQL
0

Postgresql get diff between two dates in Months

EXTRACT(year FROM age(end_date,start_date))*12 + EXTRACT(month FROM age(end_date,start_date))
Posted by: Guest on October-19-2021
-2

postgres get number of days between two dates

SELECT
  AGE('2012-03-05', '2010-04-01'),
  DATE_PART('year', AGE('2012-03-05', '2010-04-01')) AS years,
  DATE_PART('month', AGE('2012-03-05', '2010-04-01')) AS months,
  DATE_PART('day', AGE('2012-03-05', '2010-04-01')) AS days;
Posted by: Guest on May-25-2021

Code answers related to "postgres duration between two dates in months"

Code answers related to "SQL"

Browse Popular Code Answers by Language