Mendix 7 is no longer supported unless you have Extended Support. Mendix 7 documentation will remain available until July 2024.

To upgrade to a supported version, see Moving from Desktop Modeler Version 7 to Studio Pro 8.

OQL DATEDIFF

Last modified: August 2, 2022

The DATEDIFF function returns the difference between two given date/time values. The difference is given in the specified unit.

The syntax is as follows:

DATEDIFF ( unit , startdate_expression, enddate_expression )

unit

Specifies the unit of the date/time value to retrieve. This can be one of the following:

YEAR, QUARTER, MONTH, DAY, WEEK, HOUR, MINUTE or SECOND.

startdate_expression Specifies the startdate of the period being calculated. This should be formatted in an expression which resolves to a date/time value.

enddate_expression Specifies the enddate of the period being calculated. This should be formatted in an expression which resolves to a date/time value.