# Datetime Display Issue

**URL:** <https://forum.inductiveautomation.com/t/datetime-display-issue/105188>\
**Category:** Ignition\
**Tags:** vision\
**Created:** [April 16, 2025, 6:04pm UTC](https://forum.inductiveautomation.com/t/datetime-display-issue/105188 "2025-04-16T18:04:29Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![dgratz](https://avatars.discourse-cdn.com/v4/letter/d/b19c9b/32.png) [@dgratz](https://forum.inductiveautomation.com/u/dgratz)\
**Post date:** [April 16, 2025, 6:04pm UTC](https://forum.inductiveautomation.com/t/datetime-display-issue/105188/1 "2025-04-16T18:04:29Z")

</div>

I am not sure if this is a bug or something that I've configured wrong. I set up a label with an expression binding for the text property:

```python
"<html><center>" + 
dateFormat({[System]Gateway/CurrentDateTime}, "h:mm a") + "<br>" + 
dateFormat({[System]Gateway/CurrentDateTime}, "MM/DD/YYYY") + "</center>"

```

However, there is a random zero in the middle of the date when it is displayed (second line should be "04/16/2025").  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/b/5/b519e5b17b0dba6a3771169f88487a1af88e9c3a.png)  
Is there some strange setting that's causing this, or is this simply a bug?

---

<div class="post-metadata">

**Author:** ![ryan.white](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/ryan.white/32/73193_2.png) [@ryan.white](https://forum.inductiveautomation.com/u/ryan.white)\
**Post date:** [April 16, 2025, 6:12pm UTC](https://forum.inductiveautomation.com/t/datetime-display-issue/105188/2 "2025-04-16T18:12:40Z")

</div>

`DD` is day of the year (0 - 365), `dd` is day of month

> **[Data Type Formatting Reference | Ignition User Manual](https://www.docs.inductiveautomation.com/docs/8.1/appendix/reference-pages/data-type-formatting-reference)**
>
> This page formatting patterns for dates, numbers, and strings.

---

<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:** [April 16, 2025, 6:17pm UTC](https://forum.inductiveautomation.com/t/datetime-display-issue/105188/3 "2025-04-16T18:17:17Z")

</div>

You also want `yyyy` not `YYYY`:

> [@system.date.getDayOfMonth unexpected output](https://forum.inductiveautomation.com/t/system-date-getdayofmonth-unexpected-output/101808/2):
>
> Time to play 'spot the difference': startDate = system.date.parse('2024-01-01 00:00:00', 'yyyy-MM-dd HH:mm:ss') endDate = system.date.parse('2025-01-01 00:00:00', 'yyyy-MM-dd HH:mm:ss') print system.date.yearsBetween(startDate, endDate) print system.date.getSecond(startDate) == system.date.getSecond(endDate) print system.date.getMinute(startDate) == system.date.getMinute(endDate) print system.date.getHour24(startDate) == system.date.getHour24(endDate) print 'about to print dayOfMonth...' print…
