How to find Months between given 2 dates
Posted: Thu May 22, 2003 3:30 am
Hi All,
I have a text file which containts values for 2 dates.say like PDATE , SDATE(Purchase Date,Service Date) and stored as timestamp format(eg '2002-04-20 00:00:00:000', '2003-05-22 00:00:00:000' .Now i want to find the Difference between these 2 dates(SDate-PDate) in Months.Can anybody help me how to go about that.
I tried Like
(Oconv(Iconv(Sdate,"D4/YMD"),"D4/YMD) -
Oconv(Iconv(Pdate,"D4/YMD"),"D4/YMD)) / 30.0 in a trasformer but it is not working .....
Thanks & Regards,
Deva Rajan
I have a text file which containts values for 2 dates.say like PDATE , SDATE(Purchase Date,Service Date) and stored as timestamp format(eg '2002-04-20 00:00:00:000', '2003-05-22 00:00:00:000' .Now i want to find the Difference between these 2 dates(SDate-PDate) in Months.Can anybody help me how to go about that.
I tried Like
(Oconv(Iconv(Sdate,"D4/YMD"),"D4/YMD) -
Oconv(Iconv(Pdate,"D4/YMD"),"D4/YMD)) / 30.0 in a trasformer but it is not working .....
Thanks & Regards,
Deva Rajan