# Date format displays string in Perspective Table component

**URL:** <https://forum.inductiveautomation.com/t/date-format-displays-string-in-perspective-table-component/67125>\
**Category:** Ignition\
**Tags:** perspective\
**Created:** [December 1, 2022, 9:01am UTC](https://forum.inductiveautomation.com/t/date-format-displays-string-in-perspective-table-component/67125 "2022-12-01T09:01:58Z")\
**Posts on this page:** 7\
**Page:** 1

<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, 9:01am UTC](https://forum.inductiveautomation.com/t/date-format-displays-string-in-perspective-table-component/67125/1 "2022-12-01T09:01:58Z")

</div>

hi Team,  
i am trying get the data from SQL table to Perspective Table component, but dat format is displaying as string format, that i couldn't able to solve this.

 ![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/9/899bc6686544e1ff0b3ceabdb43dccdc8314552b.png)  
 ![Screenshot (10)](https://us1.discourse-cdn.com/inductiveautomation/original/3X/0/e/0e528df4aab55c914c37d5b11f7ae6c9a690db5c.png)

---

<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:** [December 1, 2022, 9:08am UTC](https://forum.inductiveautomation.com/t/date-format-displays-string-in-perspective-table-component/67125/2 "2022-12-01T09:08:52Z")

</div>

- In `props.columns` hit the + button and add in as many columns as you want to display.
- In each of those edit the `field` value to the name of the SQL column.
- For date display set the column's render to `date`.

---

<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, 9:11am UTC](https://forum.inductiveautomation.com/t/date-format-displays-string-in-perspective-table-component/67125/3 "2022-12-01T09:11:31Z")

</div>

hi,  
so i have almost 9 columns from the SQL table, you mean i have to add all 9 columns in the prop.column field??

---

<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:** [December 1, 2022, 9:12am UTC](https://forum.inductiveautomation.com/t/date-format-displays-string-in-perspective-table-component/67125/4 "2022-12-01T09:12:10Z")

</div>

Yes, if you want full control of them.

---

<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, 9:12am UTC](https://forum.inductiveautomation.com/t/date-format-displays-string-in-perspective-table-component/67125/5 "2022-12-01T09:12:52Z")

</div>

okay!! let me try.

Thanks Any way for the timely response 🙂

---

<div class="post-metadata">

**Author:** ![pascal.fragnoud](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pascal.fragnoud/32/24728_2.png) [@pascal.fragnoud](https://forum.inductiveautomation.com/u/pascal.fragnoud)\
**Post date:** [December 1, 2022, 9:18am UTC](https://forum.inductiveautomation.com/t/date-format-displays-string-in-perspective-table-component/67125/6 "2022-12-01T09:18:03Z")

</div>

In your SQL query, replace the datetime columns with this:  
`from_unixtime(column_name / 1000)` or the equivalent for your database.

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

edit: Actually, don't. It's probably better to let the table handle the display format... Configure your columns as @Transistor said.

---

<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, 9:32am UTC](https://forum.inductiveautomation.com/t/date-format-displays-string-in-perspective-table-component/67125/7 "2022-12-01T09:32:03Z")

</div>

WORKING!!

Thanks 🙂
