Timestamp difference

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
cosec
Premium Member
Premium Member
Posts: 230
Joined: Tue May 08, 2007 8:10 pm

Timestamp difference

Post 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) ?
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post 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.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Look here for example server routines. Right click and choose Save As to download.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply