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
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