Have a Question?
Table of Contents
< All Topics
Print

Error Querying Samples: “DateTime2”

ISSUE:

When querying samples you receive an error message like the one below, referencing the “datetime2” data type:

SOLUTION:

The most likely cause of that error is an unexpected collected date such as 2/8/202 instead of 2/8/2023. Try querying samples in the Sample Login screen in Edit Mode using the following expression on the SQL tab of the query controls:

CollectedDate < ‘2000-01-01’

This expression will find any samples with a collected date prior to 01-Jan-2000. Use any date that is older than what should exist in your database. See if that uncovers any incorrect collected dates recently entered. If you find an odd collected date, just correct the date and that should solve the query problem.

Table of Contents