skip to main content
Corticon Studio: Rule Language Guide : Rule operator details and examples : Days between
 

Try Corticon Now

Days between

SYNTAX

<DateTime1>.daysBetween(<DateTime2>)
<Date1>.daysBetween(<Date2>)

DESCRIPTION

Returns the Integer number of days between DateTimes or Dates. This function calculates the number of milliseconds between the date values and divides that number by 86,400,000 (the number of milliseconds in a day). Any fraction is truncated, leaving an Integer result. If the two dates differ by less than a full 24-hour period, the value returned is zero. A positive Integer value is returned when <DateTime2> occurs after <DateTime1>.

USAGE RESTRICTIONS

The Operators row of the table in Summary Table of Vocabulary Usage Restriction applies. No special exceptions

RULESHEET EXAMPLE

The following Rulesheet uses .daysBetween to determine the number of days that have elapsed between dateTime1 and dateTime2, compare it to the values in the Condition cells, and assign a value to string1.

SAMPLE RULETEST

A sample Ruletest provides dateTime1 and dateTime2 for two examples. Input and Output panels are shown below.