# Perspective Table component displaying date as integer

**URL:** <https://forum.inductiveautomation.com/t/perspective-table-component-displaying-date-as-integer/36533>\
**Category:** Ignition\
**Created:** [July 9, 2020, 12:50pm UTC](https://forum.inductiveautomation.com/t/perspective-table-component-displaying-date-as-integer/36533 "2020-07-09T12:50:35Z")\
**Posts on this page:** 19\
**Page:** 1

<div class="post-metadata">

**Author:** ![ijustdunnoaname1](https://avatars.discourse-cdn.com/v4/letter/i/c67d28/32.png) [@ijustdunnoaname1](https://forum.inductiveautomation.com/u/ijustdunnoaname1)\
**Post date:** [July 9, 2020, 12:50pm UTC](https://forum.inductiveautomation.com/t/perspective-table-component-displaying-date-as-integer/36533/1 "2020-07-09T12:50:35Z")

</div>

I have a table component that I’m using in perspective where one column needs to show a date. When viewing the value in the dataset editor, the date shows up as “7/2/20, 7:52:04 AM” as I would expect.

However, where that same data is displayed in the Perspective table, the value is showing as “1,593,690,724,000”

What do I need to do so that the column in the table matches the date value in the dataset editor?

---

<div class="post-metadata">

**Author:** ![KGarner](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kgarner/32/15999_2.png) [@KGarner](https://forum.inductiveautomation.com/u/KGarner)\
**Post date:** [July 9, 2020, 1:55pm UTC](https://forum.inductiveautomation.com/t/perspective-table-component-displaying-date-as-integer/36533/2 "2020-07-09T13:55:48Z")

</div>

As it turns out, there is a function for that specific purpose: [system.dataset.formatDates()](https://docs.inductiveautomation.com/display/DOC80/system.dataset.formatDates)

It can be used as a transform for the dataset binding like in the picture below:

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/0/3/0382dec767429432c64d4310bf6a8ac9afc7940d.png)

Hope this helps!

---

<div class="post-metadata">

**Author:** ![OscarLucas](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/oscarlucas/32/6417_2.png) [@OscarLucas](https://forum.inductiveautomation.com/u/OscarLucas)\
**Post date:** [February 9, 2021, 6:36am UTC](https://forum.inductiveautomation.com/t/perspective-table-component-displaying-date-as-integer/36533/3 "2021-02-09T06:36:52Z")

</div>

And what if we want it to affect only one column of the table?

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

---

<div class="post-metadata">

**Author:** ![atul1.m](https://avatars.discourse-cdn.com/v4/letter/a/e19b73/32.png) [@atul1.m](https://forum.inductiveautomation.com/u/atul1.m)\
**Post date:** [March 8, 2021, 5:45am UTC](https://forum.inductiveautomation.com/t/perspective-table-component-displaying-date-as-integer/36533/4 "2021-03-08T05:45:35Z")

</div>

Hi Oscar,

Did you get answer for your question?

---

<div class="post-metadata">

**Author:** ![nideyijuyidong](https://avatars.discourse-cdn.com/v4/letter/n/7cd45c/32.png) [@nideyijuyidong](https://forum.inductiveautomation.com/u/nideyijuyidong)\
**Post date:** [March 8, 2021, 7:13am UTC](https://forum.inductiveautomation.com/t/perspective-table-component-displaying-date-as-integer/36533/5 "2021-03-08T07:13:26Z")

</div>

Tried this?

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/e/d/ed9dbf74d5cba4a17743be3430f03a59c46d82b1.png)

---

<div class="post-metadata">

**Author:** ![cmallonee](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/cmallonee/32/6416_2.png) [@cmallonee](https://forum.inductiveautomation.com/u/cmallonee)\
**Post date:** [March 8, 2021, 7:24am UTC](https://forum.inductiveautomation.com/t/perspective-table-component-displaying-date-as-integer/36533/6 "2021-03-08T07:24:11Z")

</div>

For that setting to have any effect in this case, “date” must be selected as the render type. If a “date” type is what is supplied, then that setting would work, but the incoming value is a date value described as an integer.

So set the `render` property to “date”, and set the `dateFormat` property to the format you’d like to have displayed.

---

<div class="post-metadata">

**Author:** ![OscarLucas](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/oscarlucas/32/6417_2.png) [@OscarLucas](https://forum.inductiveautomation.com/u/OscarLucas)\
**Post date:** [March 9, 2021, 6:13am UTC](https://forum.inductiveautomation.com/t/perspective-table-component-displaying-date-as-integer/36533/7 "2021-03-09T06:13:29Z")

</div>

Yes, thanks, i didn’t point the column in the table.

---

<div class="post-metadata">

**Author:** ![Andrew.Meronek](https://avatars.discourse-cdn.com/v4/letter/a/a9a28c/32.png) [@Andrew.Meronek](https://forum.inductiveautomation.com/u/Andrew.Meronek)\
**Post date:** [May 25, 2021, 1:25pm UTC](https://forum.inductiveautomation.com/t/perspective-table-component-displaying-date-as-integer/36533/8 "2021-05-25T13:25:18Z")

</div>

There still seems to be something a bit messed up about this. I get the Epoch date display format to update only by creating the column properties (as shown above) but only making sure the column name of the query matches the column name of the table column property - before changing the render type. This implies that Ignition already can figure out to “auto” change the display type, but why it only does it at this point??

Also: somewhere along the script:

data = self.getSibling(“Table”).props.data  
Excel\_xlsx = system.dataset.toExcel(True,[data])

DOES convert the date format automatically, even when it’s not converted in the table’s visual display.

---

<div class="post-metadata">

**Author:** ![wla0002](https://avatars.discourse-cdn.com/v4/letter/w/f0a364/32.png) [@wla0002](https://forum.inductiveautomation.com/u/wla0002)\
**Post date:** [August 11, 2021, 6:51pm UTC](https://forum.inductiveautomation.com/t/perspective-table-component-displaying-date-as-integer/36533/9 "2021-08-11T18:51:04Z")

</div>

I am having the same issues here, I have tried many things including changing the render to date, and selecting dateFormat in my table but nothing changes the integer time to datetime. the data recieved is in the form of java date so I am not sure what my problem is.

---

<div class="post-metadata">

**Author:** ![cmallonee](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/cmallonee/32/6416_2.png) [@cmallonee](https://forum.inductiveautomation.com/u/cmallonee)\
**Post date:** [August 11, 2021, 7:11pm UTC](https://forum.inductiveautomation.com/t/perspective-table-component-displaying-date-as-integer/36533/10 "2021-08-11T19:11:33Z")

</div>

Could you please share some screenshots and code snippets that display your undesired behavior? It’s important for us to see the structure of your data as well as the configuration of your column, and also a screenshot of the appearance of the Table.

---

<div class="post-metadata">

**Author:** ![wla0002](https://avatars.discourse-cdn.com/v4/letter/w/f0a364/32.png) [@wla0002](https://forum.inductiveautomation.com/u/wla0002)\
**Post date:** [August 11, 2021, 7:18pm UTC](https://forum.inductiveautomation.com/t/perspective-table-component-displaying-date-as-integer/36533/11 "2021-08-11T19:18:22Z")

</div>

Image of the table Since, ETA columns are the ones in question

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/5/9/59b9d62fb73260a6a7d76e8f5f130d3fc1ee5f93.png)

A named query is providing data that is pulled by this script:

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

and it is bring written to a memory tags, that are then bound to the table

this is the column configuration

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

---

<div class="post-metadata">

**Author:** ![cmallonee](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/cmallonee/32/6416_2.png) [@cmallonee](https://forum.inductiveautomation.com/u/cmallonee)\
**Post date:** [August 11, 2021, 7:21pm UTC](https://forum.inductiveautomation.com/t/perspective-table-component-displaying-date-as-integer/36533/12 "2021-08-11T19:21:04Z")

</div>

The problem is due to the fact that while you have x number of columns configured, you have not explicitly specified which column should use those settings. Set `columns[6].field` to a value of “ETA” and you should see the column use a date render mode.

Edit: Sorry, column 6.

From the [documentation](https://docs.inductiveautomation.com/display/DOC81/Table+Column+Configurations):

1. Next we need to map each props.column element to a column in our underlaying data (props.data). For each **props.columns[#].field** property, set the field property to the name of a column/series in our props.data property. For example, if we’re using the default dataset on the component and we wanted the column order to be **country** , **city** , and then **population** , we would set  
props.columns.[**0**].field to **country**  
props.columns.[**1**].field to **city**  
props.columns.[**2**].field to **population**

---

<div class="post-metadata">

**Author:** ![wla0002](https://avatars.discourse-cdn.com/v4/letter/w/f0a364/32.png) [@wla0002](https://forum.inductiveautomation.com/u/wla0002)\
**Post date:** [August 11, 2021, 7:22pm UTC](https://forum.inductiveautomation.com/t/perspective-table-component-displaying-date-as-integer/36533/13 "2021-08-11T19:22:40Z")

</div>

got it, thanks!

---

<div class="post-metadata">

**Author:** ![ken.maze](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/ken.maze/32/85876_2.png) [@ken.maze](https://forum.inductiveautomation.com/u/ken.maze)\
**Post date:** [September 15, 2022, 7:46pm UTC](https://forum.inductiveautomation.com/t/perspective-table-component-displaying-date-as-integer/36533/14 "2022-09-15T19:46:20Z")

</div>

Maybe this is mentioned elsewhere, but beware that the field entry is case sensitive. If you misspell it or use wrong case, you will get the default for that column, which, in many cases for me, is the same thing (because I just put the columns in the same order as the fields that come out of the query)

Once I matched case in field, suddenly all the date formats rendered as I wanted them to.

---

<div class="post-metadata">

**Author:** ![nathaniel.brooks](https://avatars.discourse-cdn.com/v4/letter/n/df788c/32.png) [@nathaniel.brooks](https://forum.inductiveautomation.com/u/nathaniel.brooks)\
**Post date:** [July 19, 2025, 2:21am UTC](https://forum.inductiveautomation.com/t/perspective-table-component-displaying-date-as-integer/36533/15 "2025-07-19T02:21:39Z")

</div>

This topic a little old as of now but I figured I could add something .. you never know. I ran into this issue using a named query. What I did was **cast(thisdate as varchar)** in the query that changes it to a string and the table reads it fine. Best of luck.

---

<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:** [July 19, 2025, 2:38am UTC](https://forum.inductiveautomation.com/t/perspective-table-component-displaying-date-as-integer/36533/16 "2025-07-19T02:38:26Z")

</div>

That's not good practice, Nathaniel. The correct fix is shown in post #5: Set the `columns.field` properties correctly and then choose render as date on the datetime columns.

Best practice is to always keep dates as DateTime type until the point of display. In your case, if you ever have to manipulate the data then you're dealing with strings instead of DateTime and it becomes very messy. Add in timezones and daylight savings and it becomes a real mess.

---

<div class="post-metadata">

**Author:** ![nathaniel.brooks](https://avatars.discourse-cdn.com/v4/letter/n/df788c/32.png) [@nathaniel.brooks](https://forum.inductiveautomation.com/u/nathaniel.brooks)\
**Post date:** [July 19, 2025, 2:58am UTC](https://forum.inductiveautomation.com/t/perspective-table-component-displaying-date-as-integer/36533/17 "2025-07-19T02:58:16Z")

</div>

I agree, i might be doing something wrong because I don't seem to have that option.

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

---

<div class="post-metadata">

**Author:** ![lrose](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/lrose/32/62724_2.png) [@lrose](https://forum.inductiveautomation.com/u/lrose)\
**Post date:** [July 19, 2025, 3:19am UTC](https://forum.inductiveautomation.com/t/perspective-table-component-displaying-date-as-integer/36533/18 "2025-07-19T03:19:37Z")

</div>

You have to add the columns first.

Click on the add array element for each column that you have and configure them appropriately.

---

<div class="post-metadata">

**Author:** ![nathaniel.brooks](https://avatars.discourse-cdn.com/v4/letter/n/df788c/32.png) [@nathaniel.brooks](https://forum.inductiveautomation.com/u/nathaniel.brooks)\
**Post date:** [July 19, 2025, 3:32am UTC](https://forum.inductiveautomation.com/t/perspective-table-component-displaying-date-as-integer/36533/19 "2025-07-19T03:32:36Z")

</div>

Thank you, when I clicked on it the first time I thought it erased my table. I didn't think to keep clicking on it to see the other columns.
