String to timestamp conversion

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
hondaccord94
Participant
Posts: 46
Joined: Tue Aug 10, 2004 11:07 am
Location: Mclean VA

String to timestamp conversion

Post by hondaccord94 »

Hi,

I am using the StringToTimestamp function in the transformer.
I am reading a char field 26 length(no scale) trying to convert into a timestamp.
But the problem is
for example:

Input : 2005-10-14-19:45:22.666666 CHAR(26)

Even after using this format timestamp_from_string(timestamp,"%yyyy-%mm-%dd%hh:%nn:%ss.6")

Output : 2005-10-14 19:45:22 Timestamp(26)

How should I get the microsecond fields.

Thanks
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

It seems that PX has a bug with string and timestamp with millisecond portion conversions. Please take a look at this thread
hondaccord94
Participant
Posts: 46
Joined: Tue Aug 10, 2004 11:07 am
Location: Mclean VA

Post by hondaccord94 »

Yup,

You r right. Looks like there is a bug with the timestamp_from_string function. I am looking at the work arounds.

Thanks
makreddy
Participant
Posts: 21
Joined: Wed Sep 14, 2005 10:40 pm
Location: hyderabad
Contact:

Post by makreddy »

Please select extended microseconds in the metada with length 26 and scale as 6
Aravind
Post Reply