Converting YDDDHHMM to timstamp

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
srekant
Premium Member
Premium Member
Posts: 85
Joined: Wed Jan 19, 2005 6:52 am
Location: Detroit

Converting YDDDHHMM to timstamp

Post by srekant »

Hi,

I need to convert string format YDDDHHMM to timestamp format.

Y is single digit year

Ex: 80172034 should be converted as 01/17/2008 10:30:00

Any suggestions?
Sree
Minhajuddin
Participant
Posts: 467
Joined: Tue Mar 20, 2007 6:36 am
Location: Chennai
Contact:

Post by Minhajuddin »

I don't think there is a function which does *this* kind of conversion. You have to parse your input string and concatenate it back to get the timestamp.

Use something like:

Code: Select all

"01":"/":input.column[1,1]:"/":input.column[3,2]:" ":input.column[5,2]:":":input.column[7,2]:":":"00":
Minhajuddin

<a href="http://feeds.feedburner.com/~r/MyExperi ... ~6/2"><img src="http://feeds.feedburner.com/MyExperienc ... lrow.3.gif" alt="My experiences with this DLROW" border="0"></a>
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

How do you know that "8" means 2008 and not 1998?

Does "0" mean 1990, 2000 or 2010? What will "0" mean in 2010 or 2011?

Now is the time to persecute whoever is providing these data.
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