TODAY Function Syntax and Arguments
A function’s syntax refers to the layout of the function and includes the function’s name, brackets, comma separators, and arguments. The syntax for the TODAY function is: TODAY uses the computer’s serial date, which stores the current date and time, as a number, as an argument. It obtains this information on the current date by reading the computer’s clock. There are two options to enter the TODAY function into an Excel worksheet:
Type the complete function into a worksheet cell. Enter the function using the TODAY function dialog box.
Since the TODAY function does not have any arguments that can be entered manually, it’s just as easy to type the function as it is to use the dialog box.
Use TODAY in Excel Calculations
The usefulness of the TODAY function becomes evident when it is used in date calculations, often in conjunction with other Excel date functions. In the image below, rows 3 to 5 extract information related to the current date (such as the current year, month, or day) using the output of the TODAY function in cell A2 as the argument for the YEAR, MONTH, and DAY functions.
Dates as Numbers
The dates in the formulas in rows 6 and 7 can be subtracted from each other because Excel stores dates as numbers. These numbers are formatted as dates in the worksheet to make them easier to use and understand. For example, the date 11/1/2018 (November 1, 2018) in cell A2 has a serial number of 43405 (the number of days since January 1, 1900). October 15, 2015 has a serial number of 42,292. The subtraction formula in cell A6 makes use of these numbers to find the number of days between the two dates, 43,405 - 42,292 = 1113. The formula in cell A6 uses Excel’s DATE function to ensure that the date 10/15/2015 is entered and stored as a date value. The example in cell A7 uses the YEAR function to extract the current year from the TODAY function in cell A2 and then subtracts from that 1999 to find the difference between the two years, 2018 - 1999 = 19.
Troubleshoot Date Recalculation Problems
If the TODAY function does not update to the current date each time the worksheet is opened, automatic recalculation for the workbook has been turned off. To activate automatic recalculation:
Fix Date Format Issues
When subtracting two dates in Excel, the result is often displayed as another date rather than a number. This happens if the cell containing the formula was formatted as General before the formula was entered. Because the formula contains dates, Excel changes the cell format to Date. Cell A7 in the example shows a cell that has been formatted as a date. It contains the wrong information. To view the formula result as a number, the cell’s format must be set back to General or to Number: