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

Try Corticon Now

Minutes between

SYNTAX

<DateTime1>.minsBetween(<DateTime2>)
<Time1>.minsBetween(<Time2>)

DESCRIPTION

Returns the Integer number of minutes between DateTimes or between Times. The function calculates the number of milliseconds between the two dates and divides that number by 60,000 (the number of milliseconds in a minute). The decimal portion is then truncated. If the two dates differ by less than a full minute, the returned value is zero. This function returns a positive number if <DateTime2> is later than <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 .minsBetween to determine the number of minutes that have elapsed between dateTime1 and dateTime2, compare it to the Values set, 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. Notice the different masks (formats) used for the DateTime data.