I am trying to get the system date and time into a oracle table. I am using Oconv(Date(),"D,YMD[4,2,2]") and giving the datatype as Timestamp in datastage.
I get the date in the oracle table but the system time displays as 00:00:00. Do i have to give it another format to get the time . Please help
Question about system timestamp in oracle table
Moderators: chulett, rschirm, roy
Question about system timestamp in oracle table
Be nice to nerds. Chances are you’ll end up working for one.
--- Bill Gates
--- Bill Gates
DataStage "DATE" conversions only cover the date portion and not the time. You will need to specify . That will give you the time accurate to the nearest second without milliseconds.
Code: Select all
OCONV(DATE(),'D4YMD[4,2,2]'):' ':OCONV(TIME(),'MTS')
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
The DATE() and TIME() functions refer to the system clock; they will increment over the run time of your job.
To get the job start time you can prefer the system variables @DATE and @TIME in such an expression.
Or you can simply use the DataStage macro DSJobStartTimestamp
To get the job start time you can prefer the system variables @DATE and @TIME in such an expression.
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.