Database pens on EasyChart - t_stamp is not a date error

Software:
Ignition 8.1.4
SQL Server 2008 R2

Issue:
When adding DataBase pens on an EasyChart in Vision I get the error shown. Also, you can see the data table and the data table configuration I’m trying to read. Seems that I’m looking for a datetime data type, but the only column in that table with that data type is datetime, but its data is null.
Is there a way to have my EasyChart running with that t_stamp data? do I need to program something else to format that column or to have data on my datetime column?

Every little help is well appreciated


The tag historian doesn’t use a date/time datatype for t_stamp. For maximum cross-brand DB compatibility, it uses a long integer holding UTC milliseconds. You’ll need a view that converts it back to a date.

Or just use a tag historian pen for tag historian data.

I ran into this with reports, but with MySQL. I think what you need is something like in the view you create:

SELECT DATEADD(MILLISECOND, t_stamp % 1000, DATEADD(SECOND, t_stamp / 1000, ‘19700101’)) as dateTimeStamp

I don’t have a mssql database to test on, may need some tweaking.