cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Check out the JMP® Marketplace featured Capability Explorer add-in
Choose Language Hide Translation Bar
chandankishor66
Level III

Convert into nearest hours from duration ( hour:min:sec) format

Hi JMP User.

 

how to extract hours from the duration ( hr.min) format and round the min into the hours

 

example:

20.45   :    I want 21:00:00

23.4  : I want 00:00:00

4.5  : I want 05:00:00

chandankishor66_0-1664626361641.png

Regards

 

1 REPLY 1
jthi
Super User

Re: Convert into nearest hours from duration ( hour:min:sec) format

If your Column 1 is correctly formatted something like this might work (most likely there simpler formulas to use)

InHours(Hour(InHours(Hour(:Column 1) + If(Minute(:Column 1) >= 30, 1, 0))))
-Jarmo