Date Difference in Months
Posted: Fri Sep 30, 2005 1:28 pm
people,
I need to get the diffrence between 2 date fields in Months..I can use the Xfm..but cannot use any user defined Qry..or touch any DB table...
If the difference in Months is > 60..i need to set a Flag else Unset it..
The functionality shld be similar to something like
If
TIMESTAMPDIFF(64, CHAR(TIMESTAMP_ISO(CURRENT TIMESTAMP) - TIMESTAMP_ISO(a.Date_Field))) > 60 then 'Y' else 'N'
In DB2..
any ideas...
thanks.
I need to get the diffrence between 2 date fields in Months..I can use the Xfm..but cannot use any user defined Qry..or touch any DB table...
If the difference in Months is > 60..i need to set a Flag else Unset it..
The functionality shld be similar to something like
If
TIMESTAMPDIFF(64, CHAR(TIMESTAMP_ISO(CURRENT TIMESTAMP) - TIMESTAMP_ISO(a.Date_Field))) > 60 then 'Y' else 'N'
In DB2..
any ideas...
thanks.