Category:

Date and time

Compares two DateTime values.

Syntax

compare_date_time(
  Date1 DateTime,
  Date2 DateTime
): Integer

Parameters

Date1 is an first DateTime value to compare.

Date2 is an second DateTime value to compare.

Return value

Type: Integer. Returns 0 when Date1 = Date2, 1 when Date1 > Date2, and -1 when Date1 < Date2.

Examples of using

compare_date_time(date, dataset_field_val(1, 'PaymentDate'))