Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SQL

postgresql get difference between two dates

select age('2010-04-01', '2012-03-05'),
       date_part('year',age('2010-04-01', '2012-03-05')),
       date_part('month',age('2010-04-01', '2012-03-05')),
       date_part('day',age('2010-04-01', '2012-03-05'));
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #postgresql #difference #dates
ADD COMMENT
Topic
Name
8+7 =