All Forums Tools
c9jad 6 posts Joined 08/04
10 Oct 2006
Calculate the number of months between two dates

Does anyone know the best way to do this?

dnoeth 4628 posts Joined 11/04
10 Oct 2006

Use ANSI SQL interval arithmetic:select (date1 - date2) month(4)Dieter

Dieter

aravind-3019 39 posts Joined 08/06
11 Oct 2006

Hi,This is one of the way to do it.Make the use of the table sys_calendar.calendar.Example:select a.month_of_calendar-b.month_of_calendar from sys_calendar.calendar a,sys_calendar.calendar bwhere a.calendar_date='2006-10-10' and b.calendar_date='2005-10-10'Ans:12Regards,Aravind

You must sign in to leave a comment.