Product Documentation

FairCom RTG V2 Update Guide

Previous Topic

Next Topic

Millisecond Timestamp Resolution

Data acquisition has become much faster and along with it, the necessity for higher time resolution. Due to popular request, we now introduce millisecond timestamp resolution for c-tree time types. This support is available across multiple c-tree APIs, including core c-tree support, c-treeDB and c-treeACE SQL. This support required addition of extended data types, which you should understand may impact backward compatibility with some applications.

This support includes the following changes:

  • A new data type, CT_TIME_MS, was added to store time with millisecond support.
  • A new base c-tree type, CTTIMEMS, was added to hold a time with millisecond format.

Searching an index based on CT_TIME is problematic when milliseconds are significant since the index information does not contain milliseconds. SQL will error out when performing index searches on CT_TIME columns.

Timestamps with milliseconds are supported on existing timestamp data with no conversion. A minor behavior change should be noted:

Prior to this release, a query similar to the example shown below would have ignored the milliseconds portion, returning records matching '11/11/2015 12:00:15.000':

SELECT * FROM mytable WHERE mytimestamp = '11/11/2015 12:00:15.998'

With the changes described above, the milliseconds are now significant.

TOCIndex