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?
Converting YDDDHHMM to timstamp
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 467
- Joined: Tue Mar 20, 2007 6:36 am
- Location: Chennai
- Contact:
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:
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>
<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>
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
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.
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.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.