cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • Learn how to build custom Python data connectors and further customize JMP’s Data Connector Framework with the Python Data Connector Demo, available now in the JMP Marketplace!
  • See how to create experiments to support product design and ID useful product features. Register for June 12 webinar, 2pm US Eastern Time.

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