Page 1 of 1

How to specify the timestamp format for the field like this?

Posted: Mon Jul 14, 2008 6:40 am
by kinsey0514
when I using a seq stage for reading a file,
i met a field like this format:Apr 13 2006 5:07:49:720PM
In column definition it is type of timestamp
how can i specify the timestamp format for this field

Posted: Mon Jul 14, 2008 3:44 pm
by ray.wurlod
Welcome aboard.

I don't know that there's a conventional format string for this timestamp format.

I'd try reading it as VarChar and modifying it to a conventional timestamp format (adding 12 to the hours if the designator is PM, changing the decimal placeholder from ":" to ".", changing MDY order to YMD order).

Posted: Wed Jul 16, 2008 3:14 am
by yulangok
Good question! Very good question, because I also met this question and have not resolved.

Posted: Thu Jul 24, 2008 4:28 am
by shiva_eee4u
yulangok wrote:Good question! Very good question, because I also met this question and have not resolved.

Good question..... because I also met this question and have not resolved. Can i will have solution for the problem? Any one plz......

Posted: Thu Jul 24, 2008 5:03 am
by mahadev.v
Stop praising and applauding. Which part of Ray's answer did you not understand? What approach have you tried so far? What results did you get?

Posted: Thu Jul 24, 2008 5:17 am
by ray.wurlod
You could read it as a VarChar (or maybe even Char) and convert it to a conventional timestamp format.

(Which advice I am sure I have given in the past on DSXchange.)