# system.date.format('HH') Gives Hour in AM/PM not 0-23

**URL:** <https://forum.inductiveautomation.com/t/system-date-format-hh-gives-hour-in-am-pm-not-0-23/111411>\
**Category:** Ignition\
**Tags:** ignition81, scripting\
**Created:** [October 13, 2025, 8:37pm UTC](https://forum.inductiveautomation.com/t/system-date-format-hh-gives-hour-in-am-pm-not-0-23/111411 "2025-10-13T20:37:41Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![amarks](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/amarks/32/45610_2.png) [@amarks](https://forum.inductiveautomation.com/u/amarks)\
**Post date:** [October 13, 2025, 8:37pm UTC](https://forum.inductiveautomation.com/t/system-date-format-hh-gives-hour-in-am-pm-not-0-23/111411/1 "2025-10-13T20:37:41Z")

</div>

I am using `system.date.format(startDate,'yyyy_MM_dd_HHmm')`. It is currently `15:36` but I am getting `2025_10_13_0336` instead of `2025_10_13_1536`. Why?

My `startDate` comes from an expression function `dateArithmetic(now(), -12, "hr")`

---

<div class="post-metadata">

**Author:** ![David\_Stone](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/david_stone/32/79749_2.png) [@David\_Stone](https://forum.inductiveautomation.com/u/David_Stone)\
**Post date:** [October 13, 2025, 8:44pm UTC](https://forum.inductiveautomation.com/t/system-date-format-hh-gives-hour-in-am-pm-not-0-23/111411/2 "2025-10-13T20:44:06Z")

</div>

Are you in a -12hr timezone?

---

<div class="post-metadata">

**Author:** ![amarks](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/amarks/32/45610_2.png) [@amarks](https://forum.inductiveautomation.com/u/amarks)\
**Post date:** [October 13, 2025, 8:45pm UTC](https://forum.inductiveautomation.com/t/system-date-format-hh-gives-hour-in-am-pm-not-0-23/111411/3 "2025-10-13T20:45:43Z")

</div>

Central time.

I get the correct time when I use `system.date.now()`

I had my start date and end date backwards - I can never keep them straight. End date is -12 hours. That explains it
