Converting Aug 2 1958 12:00AM to 1958-08-02 12:00:00

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
ravireddy25
Participant
Posts: 59
Joined: Wed Dec 31, 2008 5:49 am

Converting Aug 2 1958 12:00AM to 1958-08-02 12:00:00

Post by ravireddy25 »

HI,
From source the values are coming like below
May 30 1967 12:00AM
Aug 2 1958 12:00AM
i need to convert in to timestamp like 1958-08-02 12:00:00

if any one has any idea plz let me know ,

Thanks in Advance
Ravi
chandra.shekhar@tcs.com
Premium Member
Premium Member
Posts: 353
Joined: Mon Jan 17, 2011 5:03 am
Location: Mumbai, India

Post by chandra.shekhar@tcs.com »

If your source and target have Timestamp datatype then you need not to worry. The database will automatically handle it.
By the way, whats the source datatype ?
Thanx and Regards,
ETL User
ravireddy25
Participant
Posts: 59
Joined: Wed Dec 31, 2008 5:49 am

Post by ravireddy25 »

Source data type is Varchar
Ravi
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

Date and Timestamp columns have no intrinsic format. You only need a format when loading from another datatype or when converting to another datatype.

In your case you need to convert the VarChar into Timestamp using something like "StringToTimeStamp(In.StringColumn,'%MMM %dd %YYYY %HH:%nn%aa')"
Post Reply