skip to main content
Corticon Studio: Rule Language Guide : DateTime data type

Try Corticon Now

DateTime data type


DateTime information may take many different formats. Corticon Studios use a common source of acceptable DateTime, Date Only, and Time Only formats, also known as masks.
For example, a date mask may specify yyyy-MM-dd as an acceptable date format, which means that an attribute of type DateTime (or Date) may hold or contain data that conforms to this format. ‘2013-04-12’ conforms to this mask; ‘April12th,2013’ does not.
For proper execution, it is important to ensure that date formats used during rule development and testing (and are included in the rule builders' Corticon Studio installations) are also present in the Corticon Server's installation. See Server Integration & Deployment Guide for more details about setting and modifying masks in both Corticon Studio and Corticon Server.


Most commercial databases represent dates as DateTimes. Such DateTimes are frequently stored as UTC, namely the number of milliseconds that have transpired from an arbitrary epoch (for example, 1/1/1970 00:00:00 GMT); this is not a universal standard but is a very popular convention. UTC dates can be rendered in the user's local time zone, but this is merely a matter of presentation. A UTC represents a simultaneous point in time for two observers regardless of where on earth they reside.
However, some date or time concepts, such as holiday, cannot be expressed conveniently as a discrete time point. Christmas (12/25/XX) actually denotes different time frames depending on the observers' time zones; thus, Corticon carries (that is, holds in memory) all dates in GMT with the time portion zeroed (that is, midnight). This approach addresses the holiday problem because a user can enter holiday dates into the database and not have them shift when they are rendered in the user's local time zone.
Carrying GMT dates should be transparent to the user. Dates expressed as strings in incoming XML are parsed and the proper data type is inferred; for dates, they are immediately instantiated as GMT and rendered back in GMT with no conversion.