Page 1 of 1

String to timestamp conversion

Posted: Wed Dec 28, 2005 11:10 am
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

Posted: Wed Dec 28, 2005 11:21 am
by ArndW
It seems that PX has a bug with string and timestamp with millisecond portion conversions. Please take a look at this thread

Posted: Wed Dec 28, 2005 1:35 pm
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

Posted: Thu Dec 29, 2005 2:35 am
by makreddy
Please select extended microseconds in the metada with length 26 and scale as 6