I need to subtract one second from the current time in a parallel job; does anyone have an approach or an example?
much appreciated
Subtract 1 second
Moderators: chulett, rschirm, roy
Basically, you need to convert into the internal format of datastag (using TimestampFromSecondsSince or TimestampFromDateTime or TimeFromMidnightSeconds or SecondsSinceFromTimestamp.... ) and subtract 1 second from it and convert it back to the required format.
Impossible doesn't mean 'it is not possible' actually means... 'NOBODY HAS DONE IT SO FAR'
-
- Charter Member
- Posts: 6
- Joined: Tue May 09, 2006 1:57 pm
-
- Participant
- Posts: 5
- Joined: Wed Apr 18, 2007 2:38 pm
Subtracting a millisecond from a Timestamp
I have a similar need but I need to subtract one millisecond from a timestamp. However, TimestampFromSecondsSince is apparently only partially-compatible with subsecond times. For example, this derivation:
TimestampFromSecondsSince(-.001, FunneledData.TRANSACTION_TIME)
yields this result:
Input :2007-04-11 15:42:28.113000
Output:2007-04-11 15:42:27.999000
It appears to round down to the full second and then subtract the partial second. Any input or alternative suggestions are appreciated.
TimestampFromSecondsSince(-.001, FunneledData.TRANSACTION_TIME)
yields this result:
Input :2007-04-11 15:42:28.113000
Output:2007-04-11 15:42:27.999000
It appears to round down to the full second and then subtract the partial second. Any input or alternative suggestions are appreciated.
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Welcome aboard. :D
Etiquette Note
We don't hijack threads. This is not the identical problem, and will have a different solution, so you must start a new thread.
Etiquette Note
We don't hijack threads. This is not the identical problem, and will have a different solution, so you must start a new thread.
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.