Cherwell IT Service Management Blog
Resources, Best Practices, and Solutions for ITSM Pros

Date/Time Substring Modifiers in Cherwell

Posted by

Date/Time fields are stored in a standard SQL Server format as YYYY-MM-DDThh:mm:ss, such as the following example:  2012-02-23T15:45:19

This string represents Thursday, the 23rd of February, 2012 at 3:45:19 PM.

Retrieving the Month Number

In order to extract the month 02 (February), a sub-string modifier is needed, starting at position 5, with a length of 2 characters:

Notice that the starting position is a number that falls BETWEEN the characters of the string, starting at position zero (0):