Page 1 of 1

Timestamp difference

Posted: Sun Jul 01, 2007 8:49 pm
by cosec
I am using the TIMESTAMPDIFF in my DB2stage to check the difference between the current timestamp and another timestamp....It seems that the result is only estimated as it considers the number of days a year as 365...Any other solution to this..? What about Days(ts1)- Days(ts2) ?

Posted: Sun Jul 01, 2007 10:18 pm
by ArndW
It depends where you wish to compute this numeric difference. If you load the timestamp into DataStage and convert it into internal format you can subtract the two values to get an exact difference in days.

Posted: Mon Jul 02, 2007 9:05 am
by ray.wurlod
Look here for example server routines. Right click and choose Save As to download.