# Perspective Alarm Status/History Table dateFormat issues

**URL:** <https://forum.inductiveautomation.com/t/perspective-alarm-status-history-table-dateformat-issues/82812>\
**Category:** Ignition\
**Tags:** ignition81, perspective\
**Created:** [December 6, 2023, 10:41pm UTC](https://forum.inductiveautomation.com/t/perspective-alarm-status-history-table-dateformat-issues/82812 "2023-12-06T22:41:02Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![jlandwerlen](https://avatars.discourse-cdn.com/v4/letter/j/bc8723/32.png) [@jlandwerlen](https://forum.inductiveautomation.com/u/jlandwerlen)\
**Post date:** [December 6, 2023, 10:41pm UTC](https://forum.inductiveautomation.com/t/perspective-alarm-status-history-table-dateformat-issues/82812/1 "2023-12-06T22:41:02Z")

</div>

A format of `YYYY-MM-dd HH:mm:ss:SSS` returns the days as `We`, `Fr`, instead of `06`, `01`. If I change the day to `DD` I get the day in month. This contradicts the docs, see link below. Is this a bug, or just something I am overlooking?

![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/2/b/2bc8b76f55672dc877a3136cff4c741cd76fd6b6.png)

[https://docs.inductiveautomation.com/display/DOC81/Data+Type+Formatting+Reference](https://docs.inductiveautomation.com/display/DOC81/Data+Type+Formatting+Reference)

---

<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:** [December 6, 2023, 10:59pm UTC](https://forum.inductiveautomation.com/t/perspective-alarm-status-history-table-dateformat-issues/82812/2 "2023-12-06T22:59:30Z")

</div>

Where exactly are you entering that format? It's not clear from your title.

It seems likely that you're passing a format string directly to a frontend component, which by definition can't use the same datetime formatting used on the backend; instead it uses Moment:  
[https://momentjs.com/docs/#/displaying/format/](https://momentjs.com/docs/#/displaying/format/)

---

<div class="post-metadata">

**Author:** ![jlandwerlen](https://avatars.discourse-cdn.com/v4/letter/j/bc8723/32.png) [@jlandwerlen](https://forum.inductiveautomation.com/u/jlandwerlen)\
**Post date:** [December 6, 2023, 11:04pm UTC](https://forum.inductiveautomation.com/t/perspective-alarm-status-history-table-dateformat-issues/82812/3 "2023-12-06T23:04:28Z")

</div>

I was using the `dateFormat` property on the table(s).

We have a requirement to use a specific date format and use a "global" definition, so from what you mention, that's not going to happen since some components use a different type of format?

---

<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:** [December 6, 2023, 11:09pm UTC](https://forum.inductiveautomation.com/t/perspective-alarm-status-history-table-dateformat-issues/82812/4 "2023-12-06T23:09:42Z")

</div>

You can achieve the exact same _output_ formatting in both Perspective "frontend" and "everywhere else in Ignition" contexts; you cannot (always) do so using the exact same format pattern in both contexts.  
You could just have a session property string that you bind all your tables' `dateFormat` to?

---

<div class="post-metadata">

**Author:** ![jlandwerlen](https://avatars.discourse-cdn.com/v4/letter/j/bc8723/32.png) [@jlandwerlen](https://forum.inductiveautomation.com/u/jlandwerlen)\
**Post date:** [December 8, 2023, 4:44pm UTC](https://forum.inductiveautomation.com/t/perspective-alarm-status-history-table-dateformat-issues/82812/5 "2023-12-08T16:44:28Z")

</div>

Please correct me if I'm wrong, but any component that uses/has a property `dateFormat` will use [Moment](https://momentjs.com/docs/#/displaying/format/) whereas anything that doesn't and uses a system function like `system.date.format` will use this [formatting](https://docs.inductiveautomation.com/display/DOC81/Data+Type+Formatting+Reference).

---

<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:** [December 8, 2023, 4:52pm UTC](https://forum.inductiveautomation.com/t/perspective-alarm-status-history-table-dateformat-issues/82812/6 "2023-12-08T16:52:16Z")

</div>

More pedantically:  
Any date/time formatting operation done on the frontend, i.e. within the component itself, will be using Moment.  
Any date/time formatting operation done on the backend, including bindings, scripts, expressions, etc, will be using Java's formatting utilities.
