Date and time Rules functions

The following Cognos TM1 functions deal with dates and times and therefore, I believe that they are important enough to warrant a quick review:

  • DATE
  • DATES
  • DAY
  • DAYNO
  • MONTH
  • NOW
  • TIME
  • TIMST
  • TMIVL
  • TODAY
  • YEAR

Please note that although all of the mentioned functions are TM1 RULES functions, each can be used within a TI process as well.

DATE

The DATE function returns a date string like YY-MM-DD for a given serial number. Good to know because the function NOW will return us a serial number!

Foo=DATE(NOW, 1);
# --- will return a string of 'YYYY-MM-DD"

DATES

DATES is a little more practical (in my opinion). It takes a numeric value for a given year, month, and day and returns a string in a similar format:

Foo=DATES(2012,12,2); # --- will ...

Get IBM Cognos TM1 Developer's Certification Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.