BETWEEN scalar functions syntax
In NPS compatibility mode, the DAYS_BETWEEN, HOURS_BETWEEN, MINUTES_BETWEEN, SECONDS_BETWEEN, and WEEK_BETWEEN scalar functions always return a positive number.
Whether NPS compatibility mode is being used depends on the setting of the SQL_COMPAT global variable.
When SQL_COMPAT='NPS', the DAYS_BETWEEN, HOURS_BETWEEN, MINUTES_BETWEEN, SECONDS_BETWEEN, and WEEK_BETWEEN scalar functions always return a positive number.
For information about the syntax of these scalar functions, see the following descriptions: