Article - CS333179

The Difference between TimeStamp and DataTime in MS SQL

Modified: 02-Nov-2020   


Applies To

  • Kepware Server (formerly KEPServerEX) 5.19.467.0 to 6.8
  • ThingWorx Kepware Server (legacy) 8.0 to 8.4

Description

MS-SQL internally interprets TIMESTAMP as binary used to process image information. It has nothing to do with OPC timestamps, dates, or time information. SQL_DATE or SQL_DATETIME should always be used to log OPC timestamp information. Note 1: DataLogger can generate database tables. The DataLogger configuration suggests a set of column names and SQL data types that are compatible with the database being connected. Users are free to override these settings. Note 2: The DataLogger runtime will detect requests to create SQL_TIMESTAMP columns on MS-SQL. It will then post an Event Log warning and override the column type, substituting SQL_DATETIME.
This is a printer-friendly version of Article 333179 and may be out of date. For the latest version click CS333179