Exploring TM1 - a Chartertech Company
Search
Close this search box.

MONTH Function in TM1: Syntax and Use

The Month function in TM1 extracts a numeric version of month from a text string that represents a date, where the date has been presented in either YYYY-MM-DD or YY-MM-DD format. It is similar to the “extract” SQL function when combined with the “month” operator.

For example, if you have a date of ‘2017-11-28′, this function will return the number 11 (not the string ’11’).

Syntax of the MONTH Function

The syntax is:

Month ( date ); where:

  • date is the string or text version of a date in either YYYY-MM-DD or YY-MM-DD format.

Example

An example of its use is where we have a date index that we know, let’s say the index associated with the date 9-Mar-1998, which is 13947. We then have a variable called sDate and into it we store the string date associated with that index by using the DATE function.

sDate = Date (13947 , 1); 

Month ( sDate);

This will return the number 3 (for March), which can then be used in numeric calculations.

This function can be used in Rules and Turbo Integrator processes.

  • This field is for validation purposes and should be left unchanged.

Post Sections

Related Posts

John Vaughan

John Vaughan

John is a CPA, MBA and has been a Performance Management consultant for over 25 years. He is the founder of ExploringTM1 and highly regarded for his experience combining financial management with corporate planning, reporting and analysis. He lives in Sydney with his wife, two of his three children, their cat, Freckles, a bunch of chooks and some fish. John is a sports nut, who played rugby until he was 40, started playing football at 54 and loves being outdoors.

Leave a Reply

Your email address will not be published. Required fields are marked *