# Switching From Military To Standard Time

**URL:** <https://forum.inductiveautomation.com/t/switching-from-military-to-standard-time/93624>\
**Category:** Ignition\
**Tags:** scripting, perspective\
**Created:** [July 23, 2024, 6:56pm UTC](https://forum.inductiveautomation.com/t/switching-from-military-to-standard-time/93624 "2024-07-23T18:56:58Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [July 23, 2024, 8:02pm UTC](https://forum.inductiveautomation.com/t/switching-from-military-to-standard-time/93624/4 "2024-07-23T20:02:31Z")

</div>

Storing dates is definitely nicer to work with; see this thread for the equivalent display function using dates:

> [@Convert seconds to HH MM SS](https://forum.inductiveautomation.com/t/convert-seconds-to-hh-mm-ss/8739/9):
>
> This is almost the "right" answer - slightly cleaner/better is to just use [stringFormat](https://docs.inductiveautomation.com/display/DOC79/stringFormat): stringFormat("%02d:%02d:%02d", hoursBetween({Root Container.Popup Calendar.date}, now()), minutesBetween({Root Container.Popup Calendar.date}, now()) % 60, secondsBetween({Root Container.Popup Calendar.date}, now()) % 60 ) Note that it's worth a disclaimer that this will "break" if you overflow 24 hours. You can solve that with an additional if statement and more complex logic, but I'll leave that for…

---

_[View the full topic](https://forum.inductiveautomation.com/t/switching-from-military-to-standard-time/93624)._
