String to Timestamp Conversion Error

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
atulgoel
Participant
Posts: 84
Joined: Tue Feb 03, 2009 1:09 am
Location: Bangalore, India

String to Timestamp Conversion Error

Post by atulgoel »

Hi,

Please tell me how to convert below string to TimeStamp format.

2012/06/04 03:10:23 AM

I am reading the above value from sequential file as Varchar, and wanted to write into Oracle table as Timestamp.

Please tell me what format should I specify in StringToTimeStamp() Function.

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

Post by ArndW »

StringToTimestamp(In.Col,"%yyyy/%mm/%dd %HH:%nn:%ss %aa")
atulgoel
Participant
Posts: 84
Joined: Tue Feb 03, 2009 1:09 am
Location: Bangalore, India

Post by atulgoel »

Thanks. Its working fine. :)
Atul
Post Reply