How to format date inside a table

Hi there,

I have a table that contain multiple data types. But the date datatypes get formatted like shown below. How can i reformat this to an actual date?

image

In the database its shown like this:
image

Configure the .props.columns list for your table to call out each column and provide datatype and rendering information:

https://docs.inductiveautomation.com/display/DOC81/Perspective+-+Table#PerspectiveTable-Properties

https://docs.inductiveautomation.com/display/DOC81/Table+Column+Configurations

Some background:

The datetime information in your database and the datatime datatypes in Ignition travel around the system as objects, and in Ignition, are timezoneless (UTC) milliseconds under the hood (java.util.Date objects, to be specific). They are only converted to strings for display.

Unfortunately, the javascript language used in browsers doesn't actually have this kind of object, so Ignition transmits the underlying UTC milliseconds to Perspective clients. Ignition's various Perspective UI components know how to display these as date/time strings when told to.

In the rare case when you need to convert to strings yourselves, there are hoops to jump through. See this topic for typical solutions:

3 Likes

Thank you so much, works great! And thanks for the background info :slight_smile:

image