I have time stamps like 620 and 1545 that i need to convert to 06:20:00 and 15:45:00
I changed the data type to an integer then used parse string to date & time with input hhmm
It works for 10am onwards but anything before that returns null
i.e. 620 should be 06:20:00 or 06:20 AM but I get null----any ideas on how to fix that?
Solved! Go to Solution.
Hi @nwiseman37
Try adding in a PadLeft() function. This will help any of the 3 digit times have a 0 tacked on to the front.
datetimeparse(padleft(tostring([Time]),4,'0'),'%H%M')
leave it as a string and add a 0 to the beginning if its less than 4 characters long. You can parse the time after that.
DateTimeParse(padleft([time],4,"0"),"%H%M")
perfect! thank you