With this conversion Oconv(@TIME,"MTS") it only shows up to the seconds of the @Time argument
I want to see the .nnn ( .ff)
Is there somehow to do it?
I need the timestamp formatted as:
yyyy-mm-dd-hh.mm.ss.nnnnnn
Using the original .nnn, not .0000 (zeros are not what I need, I want to see the original value in @TIME)
I'm using the following expression:
Oconv(@DATE,"D-YMD[4,2,2]"):'-':Oconv(@TIME,"MTS")
Any suggestions?
More accurated timestamp than Oconv(@TIME,"MTS")
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Rather than Time(), you can use System(12) to return the number of milliseconds since midnight.
Note: you need to have $OPTIONS TIME.MILLISECONDS asserted.
Microseconds are not possible using DataStage BASIC, though you might be able to invoke a system routine. However, not all operating systems support beyond milliseconds. Plus, the overhead of calling a system function might well, itself, be hundreds of microseconds.
Note: you need to have $OPTIONS TIME.MILLISECONDS asserted.
Microseconds are not possible using DataStage BASIC, though you might be able to invoke a system routine. However, not all operating systems support beyond milliseconds. Plus, the overhead of calling a system function might well, itself, be hundreds of microseconds.
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.
For example, I'm actually using:
Oconv(@DATE,"D-YMD[4,2,2]"):'-':Oconv(@DATE,"MTS")
Because the argument @DATE is a string field.
This is the timestamp from a record, saved in a file.
Reading this field as string and I want to save it in a table using milliseconds.
But using Oconv(@TIME,"MTS") it only shows until seconds.
I want to save in the table the record even with milliseconds
Oconv(@DATE,"D-YMD[4,2,2]"):'-':Oconv(@DATE,"MTS")
Because the argument @DATE is a string field.
This is the timestamp from a record, saved in a file.
Reading this field as string and I want to save it in a table using milliseconds.
But using Oconv(@TIME,"MTS") it only shows until seconds.
I want to save in the table the record even with milliseconds
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
That part of my answer that you can see gives you your answer.
The easiest way to see the entirety of premium posters' posts is to obtain a premium membership. This is the mechanism used to fund the continued existence of DSXchange (hosting and bandwidth costs).
The easiest way to see the entirety of premium posters' posts is to obtain a premium membership. This is the mechanism used to fund the continued existence of DSXchange (hosting and bandwidth costs).
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.