Using a comparison predicate with a date and time field

Different brands of database provide different functions to work with timestamp columns in SQL query statements. The query builder APIs offer the following database functions for working with timestamp columns on any supported database:

  • DateDiff – Computes the interval between two date and time fields
  • DatePart – Retrieves the parts of a date-and-time field
  • DateFromTimestamp – Retrieves the date part of a date-and-time field