cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • Instantly extract effect sizes, F-ratios, and FDR-adjusted p-values from your models with the Calculate Effects Sizes extension, available now in the JMP Marketplace!
  • 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!

Discussions

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

Converting Military Time Format (hhmm) to Time Format (hh:mm)

I need to convert military time in the hhmm format, e.g. 1432 or 725 to hh:mm format e.g. 14:32 to 7:25.  Is there a simple formula that can make the conversion, or should I use a script for it?  Thanks.

11 REPLIES 11
ms
Super User (Alumni) ms
Super User (Alumni)

Re: Converting Military Time Format (hhhh) to Time Format (hh:mm)

Still another approach that avoids strings altogether:

 

 

dt << New Column( "time",
    Numeric,
    "Continuous",
    Format( "hr:m", 12 ),
    Formula( Floor( :Military / 100 ) * 3600 + Mod( :Military, 100 ) * 60 )
);

 

khoepfl
Level I

Re: Converting Military Time Format (hhhh) to Time Format (hh:mm)

How about converting from Military Time to regular?

Recommended Articles