regarding Date difference (current date minus previous date)

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
uppalapati2003
Participant
Posts: 70
Joined: Thu Nov 09, 2006 2:14 am

regarding Date difference (current date minus previous date)

Post by uppalapati2003 »

hi All,

I have one senario, having 2 dates ie 20-09-2006 and 23-03-1983.
these are the dates ,my requirement is to calculate the difference between those two dates in days format. how to approch this ....any idea
this is in server jobs


regards
shrini
Srini
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

Convert the dates to internal format and take the difference,

Code: Select all

ABS(ICONV('20-09-2006','D4DMY')-ICONV('23-03-1983','D4DMY'))
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

If you want timestamp difference then you can use KBATimestampDeltaDays by Ken.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
Post Reply