cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • New to JMP? Join us Sept. 23-24 for the Early User Edition of Discovery Summit, tailor-made for new users. Register now for free!
  • Use World Cup data to build models, explore spatial relationships, and create informative visualizations in JMP. Register. July 17, 2 pm US Eastern Time.
  • Your voice matters! Tell us how you prefer to receive JMP updates, so we can tailor our communication to your needs. Take short survey.

Discussions

Solve problems, and share tips and tricks with other JMP users.
Choose Language Hide Translation Bar

how to change a series of numbers into time format

Hello! 

 

Can anybody help changing a series of numbers into time format [hh:mm:ss] here. 

Originally, the data type is character. So, I've tried changing the data type from character to numeric to set format as [hh:mm:ss] but I failed...

I have no idea what to do now. 

What I'd like to see as a result is, taking an example of 000003, 00:00:03..

It should not be that difficult, but I can't find a way...

 

And here's the data I'm dealing with now. 

[column1] Original Date => [column2] After changing data type from character to numeric ==> [column3] After setting time format   

 

SuperBigRabbit_1-1662617069583.png

 

Thank you in advance

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
jthi
Super User

Re: how to change a series of numbers into time format

If I understand the "original" format correctly, one option would be to first convert first column to seconds by using formula like:

Num(Left(:Column 1, 2))*60*60 + Num(Substr(Column 1, 3, 2))*60 + Num(Right(Column 1,2));

jthi_0-1662620393510.png

and then convert that to duration format

jthi_1-1662620408526.png

 

-Jarmo

View solution in original post

3 REPLIES 3
jthi
Super User

Re: how to change a series of numbers into time format

If I understand the "original" format correctly, one option would be to first convert first column to seconds by using formula like:

Num(Left(:Column 1, 2))*60*60 + Num(Substr(Column 1, 3, 2))*60 + Num(Right(Column 1,2));

jthi_0-1662620393510.png

and then convert that to duration format

jthi_1-1662620408526.png

 

-Jarmo
Georg
Level VII

Re: how to change a series of numbers into time format

Another possibility is using informat:

Georg_0-1662638878712.png

 

Georg

Re: how to change a series of numbers into time format

 This totally solved the issue. 

Thank you a lot! 

Recommended Articles