skip to main content
Corticon Studio: Rule Language Guide : Categories of rule operators : Attribute operators : Date
 

Try Corticon Now
Date
Corticon's Date attribute operators are as follows:
Name and Syntax
Returns
Description
Equals (used as a comparison)
<Date1> = <Date2>
Boolean
Returns a value of true if <Date1> is the same as <Date2>.
Equals (used as an assignment)
<Date1> = <Date2>
DateTime
Assigns the value of <Date2> to <Date1>
<Date1> <> <Date2>
Boolean
Returns a value of true if <Date1> does not equal <Date2>
<Date1> < <Date2>
Boolean
Returns a value of true if <Date1> is less than <Date2>
<Date1> > <Date2>
Boolean
Returns a value of true if <Date1> is greater than or equal to <Date2>
<Date1> <= <Date2>
Boolean
Returns a value of true if <Date1> is less than or equal to <Date2>
<Date1> >= <Date2>
Boolean
Returns a value of true if <Date1> is greater than or equal to <Date2>
attributeReference in [ |(rangeExpression)|]
Boolean
Returns a value of true if attributeReference is in the range of Date values from..to, and where opening and closing parentheses ( )indicate exclusion of that limit and square brackets [ ] indicate inclusion of that limit.
attributeReference in {listExpression}
Boolean
Returns a value of true if attributeReference is in the comma-delimited list of literal values, defined enumeration values, or - if in use - enumeration labels.
<Date>.year
Integer
Returns the century/year portion of <Date> as a four digit Integer
<Date>.month
Integer
Returns the month in <Date> as an Integer between 1 and 12
<Date>.day
Integer
Returns the day portion of <Date> as an Integer between 1 and 31
<Date>.addYears(<Integer>)
Date
Adds the number of years in <Integer> to the number of years in <Date>
<Date>.addMonth(<Integer>)
Date
Adds the number of months in <Integer> to the number of months in <DateTime>
<Date>.addDays(<Integer>)
Date
Adds the number of days in <Integer> to the number of days in <Date>
<Date1>.yearsBetween(<Date2>)
Integer
Returns the Integer number of years between <Date1> and <Date2>. This function returns a positive number if <Date2> is later than <Date1>.
<Date1>.monthsBetween(<Date2>)
Integer
Returns the Integer number of months between <Date1> and <Date2>. If the month and year portions of <Date1> and <Date2> are the same, the result is zero. This function returns a positive number if <Date2> is later than <Date1>.
<Date1>.daysBetween(<Date2>)
Integer
Returns the Integer number of days between <Date1> and <Date2>. If the two dates differ by less than a full 24-hour period, the value is zero. This function returns a positive number if <Date2> is later than <Date1>.
<Date>.dayOfWeek
Integer
Returns an Integer corresponding to day of the week, with Sunday equal to 1, in <Date>.
<Date>.weekOfYear
Integer
Returns an Integer from 1 to 52, equal to the week number within the year in <Date>
<Date>.dayOfYear
Integer
Returns an Integer from 1 to 366, equal to the day number within the year in <Date>
<Date>.weekOfMonth
Integer
Returns an Integer from 1 to 6, equal to the week number within the month in <DateTime> or <Date>. A week begins on Sunday and ends on Saturday.
<Date>.toString
String
Converts DateTime to a String with date and time information
<Date>.toDateTime
DateTime
Returns a DateTime where the date portion is equal to the value of <Date> and the time portion is equal to 00:00:00 in the system’s local timezone
<Date>.toDateTime (<string>)
DateTime
Returns a DateTime where the date portion is equal to the value of <Date> and the time portion is equal to 00:00:00 in the timezone specified by the value of <string>
getMilliseconds
toString
<Date>.toString
Integer
Converts the value of <Date> to data type <String>.
<Date>.getMilliseconds
Integer
Returns the internal date/time, namely the number of milliseconds that have transpired since the epoch 1/1/1970 00:00:00 GMT.
nextDay
<Date>.nextDay
Date
Returns the Date that represents the date that follows this Date instance.