Page 1 of 1

Converting YDDDHHMM to timstamp

Posted: Thu Jan 17, 2008 9:29 pm
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?

Posted: Thu Jan 17, 2008 10:01 pm
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":

Posted: Thu Jan 17, 2008 10:25 pm
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.