Converts date strings to numbers that can be used in calculation formulas. @TODATE converts date strings into the number of seconds elapsed since midnight, January 1, 1970.


@TODATE (formatString, dateString)
Parameter Description


The format of the date string, either "mm-dd-yyyy" or "dd-mm-yyyy" (must be in lower case).


The date string.


  • If you specify a date that is earlier than 01-01-1970, this function returns an error.

  • The latest date supported by this function is 12-31-2037.


The following example is based on the Sample Basic database.

(IF (@ATTRIBUTEVAL("Intro Date") >
Marketing - (Marketing * .1);

This formula searches for members with an Intro Date attribute member that is later than 6-30-96 and decreases Marketing for those members by 10 percent. In order to process the formula, Essbase converts the date strings to numbers before it calculates.

This example produces the following report:

                                  Actual    Jan   Massachusetts
Intro Date_12-10-1996      200-30            9                  
                           200-40            9                  
Intro Date_10-01-1996      400-10            9                  
                           400-20            9                  
Intro Date_07-26-1996      200-20            9                  
Intro Date_06-26-1996      300-10            9                  
                           300-20            9
                           300-30            9                  
Intro Date_04-01-1996      100-20           10                  
                           100-30           10                  
Intro Date_03-25-1996      100-10           10                  
Intro Date_09-27-1995      200-10           10                  

See Also