# Perspective Dataset Table Timestamp Format Issue

**URL:** <https://forum.inductiveautomation.com/t/perspective-dataset-table-timestamp-format-issue/65906>\
**Category:** Ignition\
**Tags:** perspective\
**Created:** [October 31, 2022, 9:02pm UTC](https://forum.inductiveautomation.com/t/perspective-dataset-table-timestamp-format-issue/65906 "2022-10-31T21:02:16Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Havan\_Bhavsar](https://avatars.discourse-cdn.com/v4/letter/h/aeb1de/32.png) [@Havan\_Bhavsar](https://forum.inductiveautomation.com/u/Havan_Bhavsar)\
**Post date:** [October 31, 2022, 9:02pm UTC](https://forum.inductiveautomation.com/t/perspective-dataset-table-timestamp-format-issue/65906/1 "2022-10-31T21:02:16Z")

</div>

![timestamp](https://us1.discourse-cdn.com/inductiveautomation/original/3X/e/2/e2ed428fbb4ae69adda8ffd6581692bed00f8df2.png)  
I am trying to show timestamp in the End\_Time column by the last highlighted datetime format, however it only comes up with a different kind of format. I cannot even change this format to any other datetime format from the dropdown menu. Also I do have field set to End\_Time.

---

<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:** [October 31, 2022, 9:16pm UTC](https://forum.inductiveautomation.com/t/perspective-dataset-table-timestamp-format-issue/65906/2 "2022-10-31T21:16:39Z")

</div>

What is the actual value in the cell?

---

<div class="post-metadata">

**Author:** ![Havan\_Bhavsar](https://avatars.discourse-cdn.com/v4/letter/h/aeb1de/32.png) [@Havan\_Bhavsar](https://forum.inductiveautomation.com/u/Havan_Bhavsar)\
**Post date:** [October 31, 2022, 9:20pm UTC](https://forum.inductiveautomation.com/t/perspective-dataset-table-timestamp-format-issue/65906/3 "2022-10-31T21:20:48Z")

</div>

The incorrect one. [Mon Oct 31 20:25:26 UTC 2022]

---

<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:** [October 31, 2022, 9:32pm UTC](https://forum.inductiveautomation.com/t/perspective-dataset-table-timestamp-format-issue/65906/4 "2022-10-31T21:32:10Z")

</div>

Is the actual, literal value of the cell the _string_ `[Mon Oct 31 20:25:26 UTC 2022]`?

If so, that's why this "isn't working". The date render mode and `dateFormat` option only apply if the value in the cell is, according to the rest of Perspective, an actual Date. Any given string is not.

What is the source of the data? You may need to coerce it (or simply _skip_ formatting it to a string) to ensure it shows up as a proper Date to the rest of Perspective.

---

<div class="post-metadata">

**Author:** ![Havan\_Bhavsar](https://avatars.discourse-cdn.com/v4/letter/h/aeb1de/32.png) [@Havan\_Bhavsar](https://forum.inductiveautomation.com/u/Havan_Bhavsar)\
**Post date:** [October 31, 2022, 9:56pm UTC](https://forum.inductiveautomation.com/t/perspective-dataset-table-timestamp-format-issue/65906/5 "2022-10-31T21:56:01Z")

</div>

Yes you are right, its getting the value from the tag with String datatype. However, in my code at certain instance I want no value to be displayed at End\_Time column, that's why I kept the tag datatype to String . If I kept it to Datetime datatype then if I write 0 to that tag it will return 01/01/1970 00:00:00 which I dont want it to display.

---

<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:** [October 31, 2022, 10:10pm UTC](https://forum.inductiveautomation.com/t/perspective-dataset-table-timestamp-format-issue/65906/6 "2022-10-31T22:10:51Z")

</div>

Why write `0` to indicate "no information"? Write `null`.

---

<div class="post-metadata">

**Author:** ![Transistor](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/transistor/32/3380_2.png) [@Transistor](https://forum.inductiveautomation.com/u/Transistor)\
**Post date:** [October 31, 2022, 10:20pm UTC](https://forum.inductiveautomation.com/t/perspective-dataset-table-timestamp-format-issue/65906/7 "2022-10-31T22:20:05Z")

</div>

> [@Havan\_Bhavsar](#):
>
> I kept the tag datatype to String

Bad idea. Always keep date / time as Datetime datatype and format it at the last moment at the point of display.

---

<div class="post-metadata">

**Author:** ![Havan\_Bhavsar](https://avatars.discourse-cdn.com/v4/letter/h/aeb1de/32.png) [@Havan\_Bhavsar](https://forum.inductiveautomation.com/u/Havan_Bhavsar)\
**Post date:** [October 31, 2022, 10:44pm UTC](https://forum.inductiveautomation.com/t/perspective-dataset-table-timestamp-format-issue/65906/8 "2022-10-31T22:44:11Z")

</div>

Yes, got it. Thanks guys for all the suggestions. New to coding so just learning as I come across things.
