Hi All,
I have to create a new column and have to give the current timestamp for that. what expression/Derivation I need to give with that.
Database is SYBASE.
Thanks in advance .
abhi
Current Timestamp
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Current timestamp in ISO8601 format is given by
Substitute system variables @DATE and @TIME for Date() and Time() if you want "current timestamp" as at the start time for the job, instead of as at "now".
Sybase OC expects YYYYMMDD HH:MM:SS.sss as the format. If you don't need milliseconds use
If you do need milliseconds, you will need to create a Routine, in which you enabled $OPTIONS TIME.MILLISECOND and then use SYSTEM(12) to obtain the number of milliseconds since midnight. And that's assuming your operating system can deliver clock milliseconds.
Code: Select all
Oconv(Date(), "D-YMD[4,2,2]"):" ":Oconv(Time(), "MTS:")
Sybase OC expects YYYYMMDD HH:MM:SS.sss as the format. If you don't need milliseconds use
Code: Select all
Oconv(Date(), "D-YMD[4,2,2]":@VM:"MCN"):" ":Oconv(Time(), "MTS:"):".000"
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.