Table component displaying datetime as a string

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.


(the data type provided for it from the database is as datetime)

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

1 Like

It is empty, is that a problem?

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

1 Like

Really seems like that should do it but it didnt

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

1 Like

Thank you sir that did the trick

1 Like

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

2 Likes

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.



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.