Description:
This function returns the serial number of the current date. The serial number is the date-time code used by PowerOLAP for date calculations which is namely the 1900 Date System.
Syntax: TODAY ( )
Remarks
Example
The TODAY function can be used in any database where you want to return the serial number that corresponds with today's date on your system. In this case it is possible to access this value with the help of this function. This function displays the value of the current date and time as a number corresponding to the serial date which in turn is counted forward from 1st January, 1900 (this is the base date for "TODAY" and other related functions too.)
=TODAY () |
-The current system date is converted to a Serial Number and this serial number is returned to as a result for this function. For example, if today's date is 07/24/2002, then the function would return a value = 37461 and it would disregard the time element and therefore no values will be displayed after the decimal point other than a "0". |
Let us take the example of the HR database in PowerOLAP which needs to access information that gives the information for the serial date and its value in numbers for the current date.In this case we can write a formula in the appropriate cube in PowerOLAP to write the value returned by the "TODAY" function to the appropriate member in any dimension belonging to any cube.
The formula above writes values into the "Staff Date Lookup" cube to the "Staff Date Lookup" dimension into the "TODAY" member by calculating the current date value that is the current system date with the help of the "TODAY" function which returns the desired result as a "Serial Number".This function does not take any parameter, and captures the current system date but not the time. By counting forward from 1st January, 1900, it derives a serial date which is the value returned by the function, and wherein the numbers to the left of the decimal point represent the "date" element while there are no numbers to the right of the decimal point except "0" because this function returns values only for the "date" element and not the "time" element.