Data Logger is not logging the Timestamps down to the MSEC resolution, just the MINUTE
When logging timestamps to a Microsoft SQL Server database, I can see that the milliseconds are not being recorded in the database. How do I resolve this?
This particular problem may be caused by a few things:
- The field type in the database may be set to SMALLDATETIME instead of DATETIME
- The OPC Data Logger PRESENTATION may need to be tweaked so that the timestamp is formatted to include the "Fraction of a second".
Here's an example of how to create a table which can be used with the OPC Data Logger's DETAIL MODE presentation format:
CREATE TABLE [dbo].[datalogger_detail]
(
[id] [numeric](18, 0) IDENTITY (1, 1) NOT NULL ,
[itemname] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL ,
[itemvalue] [nvarchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[itemquality] [numeric](18, 0) NOT NULL , [timetimestamp] [datetime] NOT NULL
)
ON [PRIMARY]
GO