Storing TimeStamp with MicroSeconds in a Varchar field

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
nyk1989
Participant
Posts: 22
Joined: Mon Dec 14, 2015 9:32 am

Storing TimeStamp with MicroSeconds in a Varchar field

Post by nyk1989 »

Hi guys,

I am getting XML message for my source data which has a TIME attribute with value like "2017-08-18T16:00:54.368+01:00"

I have extracted this value from the XML and stored in a field in transformer with datatype as varchar and the value after peeking into it was
"2017-08-1816:00:54.368"

So this is fine - i am happy with it.

Now, the thing is I want to change the format of this data into %dd-%mmm-%yyyy%hh%nn%ss.3

I have tried many conversions but this format change is not happening and the microseconds value gets dropped and gets replaced with '000'.

Any ideas guys how we can do this??
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

So... how exactly are you attempting to change the format? Does it involve an actual timestamp field, perhaps one that doesn't have microseconds enabled?
-craig

"You can never have too many knives" -- Logan Nine Fingers
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Have you tried TimestampToString() nested inside StringToTimestamp() ?
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply