DAY_BETWEEN macro

The DAY_BETWEEN macro is available only in HCL® Campaign.

Syntax

DAY_BETWEEN(from_date_string, to_date_string [, input_format])

Parameters

from_date_string

A text representing a valid date from which to count the number of days elapsed.

to_date_string

A text representing a valid date to which the number of days is counted. This date must be in the same format as from_date_string.

input_format

One of the keywords in the table below, specifying the date format of from_date_string and to_date_string.

Description

DAY_BETWEEN returns the number of days between from_date_string and to_date_string. If input_format is not provided, the default keyword DELIM_M_D_Y will be used.

Examples

DAY_BETWEEN("08/25/00","08/31/00") returns the number 6.

Note: See DATE for additional information on valid date formats.

Related functions

Function Description
DAY_FROMNOW Returns the number of days between the current day and a specified date.
DAY_INTERVAL Returns the number of days between two specified dates.