Hi,
I am getting timestamp string (varchar(17) ) with milliseconds.
Now using transformer i want to validate whether Timestamp is in correct format with correct value.
I am doing this:
If IsValid('TimeStamp', CL.crctn_dltn_ts) Then SetNull() Else "2010".
But its not validating milliseconds i.e it is returning null for all the below mentioned timestamp values.
Its only validating Timestamp upto 14 character and ignoring milliseconds part.
2010-12-21 10:10:10.123
2010-12-21 10:10:10 123
2010-12-21 10:10:10.abc
2010-12-21 10:10:10.123456
Please advise ASAP.
Regards
~Nirmal
How to Validate timestamp with milliseconds in Transformer
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 40
- Joined: Mon May 11, 2009 12:19 am
- Location: Madurai
-
- Participant
- Posts: 14
- Joined: Wed Nov 11, 2009 4:52 am
- Location: New York
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
The point about IsValid() is that it tests a string. There's no point trying to apply StringToTimestamp() until and unless you're confident that the string contains a valid timestamp.
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.