@TODATE
The @TODATE calculation function for Essbase converts date strings to numbers that can be used in calculation formulas.
This function converts date strings into the number of seconds elapsed since midnight, January 1, 1970.
Syntax
@TODATE (formatString, dateString)
Parameters
Notes
If you specify a date that is earlier than 01-01-1970, this function returns an error.
Example
The following example is based on the Sample Basic database.
Marketing
(IF (@ATTRIBUTEVAL("Intro Date") >
@TODATE("mm-dd-yyyy","06-30-2023"))
Marketing - (Marketing * .1);
ENDIF;);
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
Marketing
Intro Date_12-10-2023 200-30 9
200-40 9
Intro Date_10-01-2023 400-10 9
400-20 9
Intro Date_07-26-2023 200-20 9
Intro Date_06-26-2023 300-10 9
300-20 9
300-30 9
Intro Date_04-01-2023 100-20 10
100-30 10
Intro Date_03-25-2023 100-10 10
Intro Date_09-27-2022 200-10 10
See Also