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
TimeStamp Variable.
Moderators: chulett, rschirm, roy
No, you need to concatentate the system variables @DATE and @TIME, i.e.
Code: Select all
OCONV(@DATE,'D4/E'):' ':OCONV(@TIME,'MTS')
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
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.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
TimeStamp Variable/function
Hi Friends,
Thanks for your reply. but still having a problem with date conversion.
Thanks & Regards
Karthik Chandra
Thanks for your reply. but still having a problem with date conversion.
can you please let me know what is D4/E meant?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')
Thanks & Regards
Karthik Chandra
TimeStamp Variable/function
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:ssArndW wrote:Karry450 - it is in the documentation for the OCONV function. Date, 4 digits for the year with a "/" as separator and European format. ...
Thanks
karthik