Find out number of months between 2 dates
问题 select (age('2012-11-30 00:00:00'::timestamp, '2012-10-31 00:00:00'::timestamp)), (age('2012-12-31 00:00:00'::timestamp, '2012-10-31 00:00:00'::timestamp)), (age('2013-01-31 00:00:00'::timestamp, '2012-10-31 00:00:00'::timestamp)), (age('2013-02-28 00:00:00'::timestamp, '2012-10-31 00:00:00'::timestamp)) which gives the followings: 0 years 0 mons 30 days 0 hours 0 mins 0.00 secs 0 years 2 mons 0 days 0 hours 0 mins 0.00 secs 0 years 3 mons 0 days 0 hours 0 mins 0.00 secs 0 years 3 mons 28