Datetime2 format in EasyChart

Hi

Is it possible to use MSSQL server datetime2 format in EasyChart DB pens?
Now it seems to try use datetime even error message says that format should be date?

We would like to get millisecond resolution to trend from our data and easiest way is to use datetime2.

Br
Tommi Vahtera
THT Control Oy

All Java Dates have millisecond resolution, so the DB pens themselves are already set up to expect milliseconds.

Is the table itself configured with the correct datatypes? What error are you getting exactly?

I have found this as well. Ignition doesn’t seem to recognise the T-SQL datetime2 format as a datetime. I’m pulling data from a query into a table with datetime2 fields, and trying to format the display of them using the object customiser, but they won’t change format. If I change the field format to datetime, then it works… I would much rather use the newer datetime2 format. Is this a known issue?

First question: Are you using the latest release of Microsoft’s JDBC driver? The version Ignition ships with is older for compatibility reasons, so I would try updating.

1 Like

Oof, when you say old, you aren’t kidding. I just checked the version and even the latest release has 2.0.1803.100 from 2009. I’ll copy the newer one in there and cross my fingers that it works.

1 Like

A while ago now but did upgrading the version work? If so, which version did you upgrade to?

Yes it does work. Just upgrade to the latest driver available for the version of Java you’re using (8 for 7.9 and 11 for 8.x)

I’m creating a project on someone else’s system, it’s Ignition 7.6.6.

They have said I can update the SQL Server JDBC driver but I wanted to be sure before I rocked the boat

Danger Will Robinson!!!

The newest drivers will need a fairly modern java 8. A fairly modern java 8 may not run such an ancient version of Ignition. Make a complete image backup of that gateway (OS level backup) so you can revert when (likely) this blows up in your face.

If you succeed, please report back. So we can marvel at your accomplishment.. /:

1 Like

Thanks for the responses. From @nminchin response I used a Java 7 driver.

I tried mssql-jdbc-6.2.2.jre7.jar which worked.

The Easy Chart now works with datetime2

Ah, good to know that JRE7 and DATETIME2 support overlapped.

Also, if it wasn’t obvious from @pturmel 's reply, you should really upgrade… Like yesterday…

2 Likes

Not my installation. An outside contractor set it up and supports it. I’m just creating a quick front end for a new machine.