Reading timestamp field having format mm/dd/yyyy hh:mm:ss AM

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
Inquisitive
Charter Member
Charter Member
Posts: 88
Joined: Tue Jan 13, 2004 3:07 pm

Reading timestamp field having format mm/dd/yyyy hh:mm:ss AM

Post by Inquisitive »

Is it possible to read a timestamp field having the following format in a sequential file (parallel job) using the SQL Type as timestamp?



Format: mm/dd/yyyy hh:mm:ss AM/PM
T42
Participant
Posts: 499
Joined: Thu Nov 11, 2004 6:45 pm

Post by T42 »

If you had to ask, that means you already tried. Therefore, the answer is no. If you did not try, then why are you asking?

If not, you will need to read it in as Char (or VarChar if it's a delimited file), then convert it to timestamp using StringToTimestamp() with the proper format defined in the conversion.
Post Reply