# Time format yyyy-MM-dd HH:mm:ss does not work correctly

**URL:** <https://forum.inductiveautomation.com/t/time-format-yyyy-mm-dd-hh-mm-ss-does-not-work-correctly/1983>\
**Category:** Ignition\
**Created:** [June 28, 2010, 4:31pm UTC](https://forum.inductiveautomation.com/t/time-format-yyyy-mm-dd-hh-mm-ss-does-not-work-correctly/1983 "2010-06-28T16:31:21Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![Robert](https://avatars.discourse-cdn.com/v4/letter/r/e95f7d/32.png) [@Robert](https://forum.inductiveautomation.com/u/Robert)\
**Post date:** [June 28, 2010, 4:31pm UTC](https://forum.inductiveautomation.com/t/time-format-yyyy-mm-dd-hh-mm-ss-does-not-work-correctly/1983/1 "2010-06-28T16:31:21Z")

</div>

In the table customizer, when I use this ‘yyyy-MM-dd HH:mm:ss’ to format a time stamp, I am getting ‘yyyy-MM-dd HH:mm:ss.sss’

---

<div class="post-metadata">

**Author:** ![Travis.Cox](https://avatars.discourse-cdn.com/v4/letter/t/b9bd4f/32.png) [@Travis.Cox](https://forum.inductiveautomation.com/u/Travis.Cox)\
**Post date:** [June 28, 2010, 8:46pm UTC](https://forum.inductiveautomation.com/t/time-format-yyyy-mm-dd-hh-mm-ss-does-not-work-correctly/1983/2 "2010-06-28T20:46:14Z")

</div>

What is the table bound to? SQLTags history?

---

<div class="post-metadata">

**Author:** ![Robert](https://avatars.discourse-cdn.com/v4/letter/r/e95f7d/32.png) [@Robert](https://forum.inductiveautomation.com/u/Robert)\
**Post date:** [June 28, 2010, 9:07pm UTC](https://forum.inductiveautomation.com/t/time-format-yyyy-mm-dd-hh-mm-ss-does-not-work-correctly/1983/3 "2010-06-28T21:07:20Z")

</div>

In one case it’s a sql query on a postgres table. In an other is data returned from system.alert.queryAlertHistory.

---

<div class="post-metadata">

**Author:** ![Travis.Cox](https://avatars.discourse-cdn.com/v4/letter/t/b9bd4f/32.png) [@Travis.Cox](https://forum.inductiveautomation.com/u/Travis.Cox)\
**Post date:** [June 28, 2010, 9:33pm UTC](https://forum.inductiveautomation.com/t/time-format-yyyy-mm-dd-hh-mm-ss-does-not-work-correctly/1983/4 "2010-06-28T21:33:43Z")

</div>

The date format string only happens when the column in the dataset is a DATETIME data type. The queryAlertHistory right now does not return it as such. Check your dataset to see what the data type is.

---

<div class="post-metadata">

**Author:** ![Robert](https://avatars.discourse-cdn.com/v4/letter/r/e95f7d/32.png) [@Robert](https://forum.inductiveautomation.com/u/Robert)\
**Post date:** [July 1, 2010, 7:25pm UTC](https://forum.inductiveautomation.com/t/time-format-yyyy-mm-dd-hh-mm-ss-does-not-work-correctly/1983/5 "2010-07-01T19:25:49Z")

</div>

I looked at the dataset and it showed ‘07/01/2010 12:08:52’. The table displaying the dataset showed 2010-07-01 12:08:53.471. In the table customizer the format is ‘yyyy-MM-dd HH:mm:ss’

---

<div class="post-metadata">

**Author:** ![Carl.Gould](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/carl.gould/32/7262_2.png) [@Carl.Gould](https://forum.inductiveautomation.com/u/Carl.Gould)\
**Post date:** [July 16, 2010, 2:02am UTC](https://forum.inductiveautomation.com/t/time-format-yyyy-mm-dd-hh-mm-ss-does-not-work-correctly/1983/6 "2010-07-16T02:02:40Z")

</div>

You need to look at the actual type of the column in question. You can see this in the dataset viewer for that property.

---

<div class="post-metadata">

**Author:** ![Robert](https://avatars.discourse-cdn.com/v4/letter/r/e95f7d/32.png) [@Robert](https://forum.inductiveautomation.com/u/Robert)\
**Post date:** [July 20, 2010, 10:06pm UTC](https://forum.inductiveautomation.com/t/time-format-yyyy-mm-dd-hh-mm-ss-does-not-work-correctly/1983/7 "2010-07-20T22:06:12Z")

</div>

Finally got this setup again.

The dataset viewer says the column is a date column.  
Why would the formatting work in the viewer but not the actual table?

---

<div class="post-metadata">

**Author:** ![Carl.Gould](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/carl.gould/32/7262_2.png) [@Carl.Gould](https://forum.inductiveautomation.com/u/Carl.Gould)\
**Post date:** [July 21, 2010, 12:36am UTC](https://forum.inductiveautomation.com/t/time-format-yyyy-mm-dd-hh-mm-ss-does-not-work-correctly/1983/8 "2010-07-21T00:36:12Z")

</div>

Can you export the window and send it to us or post it here please?

---

<div class="post-metadata">

**Author:** ![Robert](https://avatars.discourse-cdn.com/v4/letter/r/e95f7d/32.png) [@Robert](https://forum.inductiveautomation.com/u/Robert)\
**Post date:** [July 21, 2010, 5:09pm UTC](https://forum.inductiveautomation.com/t/time-format-yyyy-mm-dd-hh-mm-ss-does-not-work-correctly/1983/9 "2010-07-21T17:09:15Z")

</div>

alarmsummary.vwin has been uploaded to the support area.

---

<div class="post-metadata">

**Author:** ![Carl.Gould](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/carl.gould/32/7262_2.png) [@Carl.Gould](https://forum.inductiveautomation.com/u/Carl.Gould)\
**Post date:** [July 21, 2010, 11:12pm UTC](https://forum.inductiveautomation.com/t/time-format-yyyy-mm-dd-hh-mm-ss-does-not-work-correctly/1983/10 "2010-07-21T23:12:11Z")

</div>

I must be missing something. Looks correct to me.  
 ![](https://us1.discourse-cdn.com/inductiveautomation/original/1X/f2155b96656a89d966085ffa98ff7cf3680197c9.PNG)

---

<div class="post-metadata">

**Author:** ![Robert](https://avatars.discourse-cdn.com/v4/letter/r/e95f7d/32.png) [@Robert](https://forum.inductiveautomation.com/u/Robert)\
**Post date:** [July 22, 2010, 4:51pm UTC](https://forum.inductiveautomation.com/t/time-format-yyyy-mm-dd-hh-mm-ss-does-not-work-correctly/1983/11 "2010-07-22T16:51:56Z")

</div>

WTF?

I’m running 7.1.4  
[alarmsummary.pdf](https://us1.discourse-cdn.com/inductiveautomation/original/1X/f33c770c97167ed3eecf427b4e2a092b2db58300.pdf) (209 KB)

---

<div class="post-metadata">

**Author:** ![Carl.Gould](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/carl.gould/32/7262_2.png) [@Carl.Gould](https://forum.inductiveautomation.com/u/Carl.Gould)\
**Post date:** [August 5, 2010, 5:33pm UTC](https://forum.inductiveautomation.com/t/time-format-yyyy-mm-dd-hh-mm-ss-does-not-work-correctly/1983/12 "2010-08-05T17:33:38Z")

</div>

Maybe it has to do with running in a French locale? We’ll investigate
