# Perspective table query

**URL:** <https://forum.inductiveautomation.com/t/perspective-table-query/44423>\
**Category:** Ignition\
**Tags:** ignition80, perspective\
**Created:** [March 12, 2021, 6:43pm UTC](https://forum.inductiveautomation.com/t/perspective-table-query/44423 "2021-03-12T18:43:33Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![suryawanshinr2011](https://avatars.discourse-cdn.com/v4/letter/s/eb8c5e/32.png) [@suryawanshinr2011](https://forum.inductiveautomation.com/u/suryawanshinr2011)\
**Post date:** [March 12, 2021, 6:43pm UTC](https://forum.inductiveautomation.com/t/perspective-table-query/44423/1 "2021-03-12T18:43:33Z")

</div>

I am using perspective table, in that table i assigned named query, which is one of the sql database table, which has a records. in that table there are two timestamps columns called as “In\_time” and “Out\_time” table works perfect but these timestamp column showing time in milliseconds. but in database Time stamp format is correct. for converting these timestamp milliseconds to date format i used map transform with script function with some script and it worked but my table header order is changed that could not able to fix for correct order  
Is there any other way to convert this date time stamp value to correct format.  
well ! scenario is very clear and simple anyone can try and see the result Please let me know if you having simple solution .  
another question "how to change background colour of row of table dynamically for example row colour can be change by parameter passing.if any one help me it would be great help  
Thanks, learning never stop keep digging

---

<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:** [March 12, 2021, 7:07pm UTC](https://forum.inductiveautomation.com/t/perspective-table-query/44423/2 "2021-03-12T19:07:34Z")

</div>

To fix the table column order go to the table _PROPS_, _columns_, and set the _field_ name for column 0 to “In\_time” and column 1 to “Out\_time”. You must use capital letters exactly as returned by the query.

For background colours see if the answers to my similar question help. [Perspective Table - Invididual Cell Conditional Formatting](http://forum.inductiveautomation.com/t/perspective-table-invididual-cell-conditional-formatting/39371).

---

<div class="post-metadata">

**Author:** ![suryawanshinr2011](https://avatars.discourse-cdn.com/v4/letter/s/eb8c5e/32.png) [@suryawanshinr2011](https://forum.inductiveautomation.com/u/suryawanshinr2011)\
**Post date:** [March 12, 2021, 7:15pm UTC](https://forum.inductiveautomation.com/t/perspective-table-query/44423/3 "2021-03-12T19:15:24Z")

</div>

Thanks for quick response@Transistor ,Highly Appreciated
