TimeStamp Variable.

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
karry450
Participant
Posts: 201
Joined: Wed Nov 14, 2007 11:31 pm
Location: HYD

TimeStamp Variable.

Post by karry450 »

hi friends,

I am using @DATE as system variable at the moment to get the date as my output .

Is there any system variable to get date+timestamp as output.

Thanks &Regards
Karthik
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

No, you need to concatentate the system variables @DATE and @TIME, i.e.

Code: Select all

OCONV(@DATE,'D4/E'):' ':OCONV(@TIME,'MTS')
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

System variables give the job start, which timestamp can also be had via the DSJobStartTimestamp macro. If you need the timestamp "now", prefer Date() and Time() functions.

Code: Select all

Oconv(Date(), "D-YMD[4,2,2]") : " " : Oconv(Time(), "MTS:")
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
karry450
Participant
Posts: 201
Joined: Wed Nov 14, 2007 11:31 pm
Location: HYD

TimeStamp Variable/function

Post by karry450 »

Hi Friends,

Thanks for your reply. but still having a problem with date conversion.

ArndW wrote:No, you need to concatentate the system variables @DATE and @TIME, i.e.

Code: Select all

OCONV(@DATE,'D4/E'):' ':OCONV(@TIME,'MTS')
...
can you please let me know what is D4/E meant?

Thanks & Regards
Karthik Chandra
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

Karry450 - it is in the documentation for the OCONV function. Date, 4 digits for the year with a "/" as separator and European format.
karry450
Participant
Posts: 201
Joined: Wed Nov 14, 2007 11:31 pm
Location: HYD

TimeStamp Variable/function

Post by karry450 »

ArndW wrote:Karry450 - it is in the documentation for the OCONV function. Date, 4 digits for the year with a "/" as separator and European format. ...
But when I try this function im getting in the format of MM/DD/YYYY hh:mm:ss but is there any way to convert it to DD/MM/YYYY hh:mm:ss


Thanks
karthik
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

karry450 - The format for that would be "D4/DMY[2,2,4]"
Post Reply