O'Reilly logo

IBM Cognos TM1 Developer's Certification Guide by James D. Miller

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required