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.