Category:

Date and time

Calculates difference in days (as floating-point number) between two DateTime values.

Syntax

date_time_diff(
  Date1 DateTime,
  Date2 DateTime
): Numeric

Parameters

Date1 is an first DateTime value to compare.

Date2 is an second DateTime value to compare.

Return value

Type: Numeric. Returns the difference in days (as floating-point number) between two DateTime values. For example, result of 1.5 means one day and 12 hours.

Examples of using

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