string to timestamp conversion

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
dodda
Premium Member
Premium Member
Posts: 244
Joined: Tue May 29, 2007 11:31 am

string to timestamp conversion

Post by dodda »

Hi,

Iam having a sequential file with following two columns

SHPDATE column with data 20080202 of varchar (8)

SHPTIME column with data 1825 of varchar (4)

Both the columns should be concatenated and map to target column SHPTM of timestamp datatype and data should be of 20080202182500

Please suggest me to solve this one.

Thanks in advance

dodda
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

StringToTimestamp() function in Transformer stage. Concatenate your strings as the first argument, and provide an appropriate timestamp format string - depending on what you've done with the strings (for example inserted delimiter characters.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply