# Table component displaying datetime as a string

**URL:** <https://forum.inductiveautomation.com/t/table-component-displaying-datetime-as-a-string/58114>\
**Category:** Ignition\
**Tags:** perspective\
**Created:** [April 6, 2022, 3:25pm UTC](https://forum.inductiveautomation.com/t/table-component-displaying-datetime-as-a-string/58114 "2022-04-06T15:25:36Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dean\_Walsh](https://avatars.discourse-cdn.com/v4/letter/d/8797f3/32.png) [@Dean\_Walsh](https://forum.inductiveautomation.com/u/Dean_Walsh)\
**Post date:** [April 6, 2022, 3:25pm UTC](https://forum.inductiveautomation.com/t/table-component-displaying-datetime-as-a-string/58114/1 "2022-04-06T15:25:36Z")

</div>

I would like to display a datetime from an SQL database in a table but i believe its giving me the date as a string despite seemingly recognizing it as a date in the dataset editor.

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/a/2/a24d4a9c34576ecde4e6df88a754d3f018d2a492.png)  
(the data type provided for it from the database is as datetime)

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [April 6, 2022, 3:32pm UTC](https://forum.inductiveautomation.com/t/table-component-displaying-datetime-as-a-string/58114/2 "2022-04-06T15:32:01Z")

</div>

What does the “columns” property of your table look like?

---

<div class="post-metadata">

**Author:** ![Dean\_Walsh](https://avatars.discourse-cdn.com/v4/letter/d/8797f3/32.png) [@Dean\_Walsh](https://forum.inductiveautomation.com/u/Dean_Walsh)\
**Post date:** [April 6, 2022, 3:34pm UTC](https://forum.inductiveautomation.com/t/table-component-displaying-datetime-as-a-string/58114/3 "2022-04-06T15:34:15Z")

</div>

It is empty, is that a problem?

---

<div class="post-metadata">

**Author:** ![jonathan.taylor](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/jonathan.taylor/32/4048_2.png) [@jonathan.taylor](https://forum.inductiveautomation.com/u/jonathan.taylor)\
**Post date:** [April 6, 2022, 3:34pm UTC](https://forum.inductiveautomation.com/t/table-component-displaying-datetime-as-a-string/58114/4 "2022-04-06T15:34:59Z")

</div>

I would add the columns you want in that property and use the render and dateFormat settings to tell the table how you want the date displayed

---

<div class="post-metadata">

**Author:** ![Dean\_Walsh](https://avatars.discourse-cdn.com/v4/letter/d/8797f3/32.png) [@Dean\_Walsh](https://forum.inductiveautomation.com/u/Dean_Walsh)\
**Post date:** [April 6, 2022, 3:40pm UTC](https://forum.inductiveautomation.com/t/table-component-displaying-datetime-as-a-string/58114/5 "2022-04-06T15:40:38Z")

</div>

Really seems like that should do it but it didnt

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/c/6/c618b95100495dd21977dc5058271ca6ad3889ba.png)

---

<div class="post-metadata">

**Author:** ![jonathan.taylor](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/jonathan.taylor/32/4048_2.png) [@jonathan.taylor](https://forum.inductiveautomation.com/u/jonathan.taylor)\
**Post date:** [April 6, 2022, 3:41pm UTC](https://forum.inductiveautomation.com/t/table-component-displaying-datetime-as-a-string/58114/6 "2022-04-06T15:41:53Z")

</div>

You need to tell the field property the name of the column of data it is looking at.

---

<div class="post-metadata">

**Author:** ![Dean\_Walsh](https://avatars.discourse-cdn.com/v4/letter/d/8797f3/32.png) [@Dean\_Walsh](https://forum.inductiveautomation.com/u/Dean_Walsh)\
**Post date:** [April 6, 2022, 3:42pm UTC](https://forum.inductiveautomation.com/t/table-component-displaying-datetime-as-a-string/58114/7 "2022-04-06T15:42:28Z")

</div>

Thank you sir that did the trick

---

<div class="post-metadata">

**Author:** ![jonathan.taylor](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/jonathan.taylor/32/4048_2.png) [@jonathan.taylor](https://forum.inductiveautomation.com/u/jonathan.taylor)\
**Post date:** [April 6, 2022, 3:44pm UTC](https://forum.inductiveautomation.com/t/table-component-displaying-datetime-as-a-string/58114/8 "2022-04-06T15:44:41Z")

</div>

As a side note, use the header section in there to change the appearance/text of the title etc of each column in the table.

Look at the columns properties here for all the info you need:

[https://docs.inductiveautomation.com/display/DOC81/Perspective+-+Table](https://docs.inductiveautomation.com/display/DOC81/Perspective+-+Table)

---

<div class="post-metadata">

**Author:** ![Amruth\_Jois](https://avatars.discourse-cdn.com/v4/letter/a/7ea924/32.png) [@Amruth\_Jois](https://forum.inductiveautomation.com/u/Amruth_Jois)\
**Post date:** [December 1, 2022, 8:55am UTC](https://forum.inductiveautomation.com/t/table-component-displaying-datetime-as-a-string/58114/9 "2022-12-01T08:55:42Z")

</div>

Not working in my case, facing the same issue. if edit the column field property, i cannot able to see the SQL table, instead only the column which i declared can be seen.

 ![Screenshot (7)](https://us1.discourse-cdn.com/inductiveautomation/original/3X/4/3/43769341cffa23065ae9c5bfbe83a3241f295ac0.png)  
 ![Screenshot (8)](https://us1.discourse-cdn.com/inductiveautomation/original/3X/8/4/842cfa6a48f6f4e206f412be877c3a521cf15951.png)  
 ![Screenshot (10)](https://us1.discourse-cdn.com/inductiveautomation/original/3X/1/2/125fcf752f9052865b951f00d2fd880eb68286dd.png)

---

<div class="post-metadata">

**Author:** ![jonathan.taylor](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/jonathan.taylor/32/4048_2.png) [@jonathan.taylor](https://forum.inductiveautomation.com/u/jonathan.taylor)\
**Post date:** [December 1, 2022, 9:09am UTC](https://forum.inductiveautomation.com/t/table-component-displaying-datetime-as-a-string/58114/10 "2022-12-01T09:09:00Z")

</div>

That's normal behaviour. Define all columns you wish to see from your query and then adjust the rendering of the data to display as date.
