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

DAY TM1 Function: How to Use, Syntax and Example

The DAY function in TM1 is almost exactly the same as the same function in Excel, in that it returns the day of the month from a date. It is also slightly different to the Excel in that the source for the function is a string-based date, either in the form YY-MM-DD or YYYY-MM-DD.

Therefore, you cannot directly present it with a serial date to get the day of the month. The day of month outcome is a number.

Syntax of the DAY Function in TM1

The syntax of the function in TM1 is dead simple. It is just:

DAY ( DateString );

where:

DateString is either in the form YY-MM-DD or YYYY-MM-DD.

Example

An example of the function is as follows.

DAY ( '25-08-19' );

This will return the number 19, which could be used in any numeric calculation. Of course, you can use a text variable to populate the function in TM1. In that instance, it would look like this:

sDate = '25-08-19';
DAY ( sDate );

This will result in the same value of 19 as presented above.

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

Post Sections

Related Posts

Leave a Reply

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

Log In