SYSDATE

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
appcon
Participant
Posts: 23
Joined: Wed Jul 07, 2004 8:11 am

SYSDATE

Post by appcon »

Hi ,

I need to generate sysdate in datastage which I will be using later to do comparision with dates in my table.

Any suggestions as to how to generate sysdate in DS.

Thanks,
Sri.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

It's already generated for you. Check out the System Variables @DATE and @TIME which represent the date/time that the 'job' started. Note that this is a constant value and would be used when you want to timestamp every row identically for the same unit of work. Also note that Best Practice say: use this in the initial value derivation of a stage variable and then reference it in your job, don't reference it directly for every row.

You should also check out the TimeDate() function for a way to get the current system time.
-craig

"You can never have too many knives" -- Logan Nine Fingers
Post Reply