BookmarkSubscribe
Choose Language Hide Translation Bar
Highlighted
Sciguy_1
Contributor

Converting numeric seconds to 0:00.0 time format

I cannot seem to find a simple way to accomplish this in jmp. I have tried to include a snapshot of what I am doing but does not want to load. Say that I have a numeric value of 0.000021713. In time format this should be 0:01.9   When I apply the m/s format with 1 decimal to the numeric value, jmp returns 0:00.0  This is not difficult to replicate, my colleagues see the same issue.

 

Not sure if I am doing something incorrect or if in fact it is a programming issue within jmp. I have been using jmp for several years now, first time I have run across an issue I cannot seem to find assistance to resolve. Any assistance would be much appreciated.

0 Kudos
1 ACCEPTED SOLUTION

Accepted Solutions

Re: Converting numeric seconds to 0:00.0 time format

I believe you are looking at .000021713 as a fraction of a day. But JMP's time units are in seconds. So, if you take that 0.000021713 and put it into the "In Days" function, you will get 1.8760032. Now apply your format and add one decimal place. You will get what you want.

 

I am including a data table that shows all of these steps.

Dan Obermiller
7 REPLIES 7
julian
Staff

Re: Converting numeric seconds to 0:00.0 time format

Hi @Sciguy_1,

I suspect this is in part due to the number of decimal places you are showing. In the attached example I changed to 10 in the Column Properties for my duration column (see below). 

 

But, I'm a little confused about why you expect 0.000021713 to come out formatted as 0:01.9. Is your numeric value not in seconds? If it's something else I'm sure we can figure out a transformation to get it into a format JMP is expecting.

 

@julian 

 


time.png

 

0 Kudos

Re: Converting numeric seconds to 0:00.0 time format

I believe you are looking at .000021713 as a fraction of a day. But JMP's time units are in seconds. So, if you take that 0.000021713 and put it into the "In Days" function, you will get 1.8760032. Now apply your format and add one decimal place. You will get what you want.

 

I am including a data table that shows all of these steps.

Dan Obermiller
Sciguy_1
Contributor

Re: Converting numeric seconds to 0:00.0 time format

You are correct thank you for taking a look at it and recognizing the problem. I got the In Days function to work but I dont understand how get it "In Seconds". Thank you to everyone for your input on this issue. 

0 Kudos

Re: Converting numeric seconds to 0:00.0 time format

The "In Days" function will take a number that is expressed in days and convert it to the number of seconds. So "In Days(1)" will be 86400 which is the number of seconds in a day.

 

In the table that I provided, there are three columns.

Input: this column contains the value that you provided. It is a time which is measured in days (not seconds)

 

In Seconds: This column contains the value that you provided, but in seconds. This column is a formula which uses the "In Days" function.

 

Formatted "In Seconds": This column changes the number of  seconds in the "In Seconds" column and uses the format that you want "min:s". Note that this column is not really needed other than providing the 0 minutes and the colon to separate minutes from seconds. The In Seconds column shows that this is truly going to be 1.876 seconds (or 1.9 when rounded to one decimal place).

 

Any of the items in bold text are simply column names. You could specify anything you want there.

 

One last thing that may help. Since there are 86400 seconds in a day, your value of 0.000021713*86400 = 1.8760032. This shows that your 0.000021713 is really telling you the fraction of a day that was measured.

 

Dan Obermiller
0 Kudos
Sciguy_1
Contributor

Re: Converting numeric seconds to 0:00.0 time format

Ok I was being an idiot I got it. Thank you to everyone for your input!
0 Kudos
txnelson
Super User

Re: Converting numeric seconds to 0:00.0 time format

A duration format of min:s is the closest format I can find to your specified m/s format.  A numeric value of 1.9 will return a min:s formated value of 0:01.9.  Your numeric value of 0.000021713, if I specify 6 decimal places returns 0:00.000022.  JMP time data is measured in seconds, so I don't see how 0.000021713 would ever have a value of 1.9.  I must be missing something.

Jim
gzmorgan0
Super User

Re: Converting numeric seconds to 0:00.0 time format

Just an FYI, @Sciguy_1 , I thought you understood my reply on May 29th. Hmmm...

 

https://community.jmp.com/t5/Discussions/Text-time-to-numeric-time/m-p/211008

0 Kudos