Hi all
In transformer I want to subtract -1 microsecond from the incoming timestamp '2011-02-24 07:53:08.266692' after comparison and I should get output as '2011-02-24 07:53:08.266691' Can you let me know how to achieve this is Datastage?
subtract 1 microsecond from incoming timestamp
Moderators: chulett, rschirm, roy
-
- Premium Member
- Posts: 57
- Joined: Tue Jun 30, 2009 9:38 am
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Pretty straightforward. Strip off the microseconds, if non-zero subtract 1 and re-attach. If microseconds are zero use 999999 and subtract 1 from the seconds (perhaps using TimestampFromSecondsSince() function) before re-attaching.
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.
-
- Participant
- Posts: 94
- Joined: Wed May 08, 2002 8:44 am
- Location: Germany
- Contact:
use function TimestampOffsetByComponents
At least in DataStage 11.x there is a function called TimestampOffsetByComponents, which also supports microseconds to be added/subtracted in the seconds-component... :D
Cheers
Klaus
Cheers
Klaus