Excel - TODAY Function



TODAY Function

The Excel TODAY function will retrieve the current date formatted as a Date. It is categorized under the Date and Time functions in Excel. If the cell formatting is chosen as the General/Number category, then the TODAY() function returns the Date serial number. This function is automatically updated whenever you perform some calculation in the workbook.

Compatibility

This advanced Excel function is compatible with the following versions of MS Excel −

  • Excel for Microsoft 365
  • Excel for Microsoft 365 for Mac
  • Excel for the web
  • Excel 2024
  • Excel 2024 for Mac
  • Excel 2021
  • Excel 2021 for Mac
  • Excel 2019
  • Excel 2016
  • Excel 2013
  • Excel 2010
  • Excel 2007

Syntax

The syntax of the TODAY function is as follows −

=TODAY()

Arguments

The TODAY Function syntax has no arguments.

Points to Remember

  • The dates are saved in Excel in the form of the Date serial numbers in order to employ them in complex calculations. By default, serial number 1 is assigned to January 1, 1900, and serial number 39448 is assigned to January 1, 2008, as there are 39,447 days after January 1, 1900.
  • If the date is not modified after executing the TODAY function, you must alter the system settings.

Examples of the TODAY Function in Excel

Practice the following examples to learn the use of the TODAY function in Excel.

Example 1: How to Insert the Dates in Excel Automatically?

In this example, we will employ the today date formula to insert the current date automatically in Excel dd/mm/yyyy format.

Solution

Step 1 − First, open the desired Excel worksheet, double-click on the B3 cell, and write the formula =TODAY() in it.

Insert the Dates in Excel Automatically1

After that, hit the Enter tab to get the current date in the specific format.

Insert the Dates in Excel Automatically2

Note − To change the TODAY() format, press "Ctrl +1" to open the Format Cells dialog box, select the Date category in the Category: section, and select the specific date format in the Type: section.

Step 2 − Moreover, you may also subtract the date from today's date using the – operator. Let's say you have entered the specific date in the C2 cell. Then, select the B3 cell and enter the expression =B2-C2. Here, the B2 cell refers to the current date.

Insert the Dates in Excel Automatically3

Then, press the Enter tab to get the resulting value.

Insert the Dates in Excel Automatically4

Example 2: How to Calculate the Age in Excel using the TODAY Function?

In this example, the TODAY() function is used to evaluate the age by subtracting the date of birth then divide the computed result by the 365 days in Excel.

Solution

Step 1 − First, open the desired spreadsheet with a date of birth specified in the A column, select the B2 and B3 cells, and type the TODAY() formula in Excel for age =(TODAY()-A2)/365 in the formula bar.

Calculate Age in Excel using TODAY Function1

Step 2 − Afterward, press the "Ctrl+Enter" to get the result.

Calculate Age in Excel using TODAY Function2

Example 3: How to calculate the 90 Days from the Current date in Excel?

In this example, we will effectively use the Conditional formatting feature and set the specific criteria using the TODAY() function to highlight the dates that are 90 dates from the current date.

Solution

Step 1 − First, select the cell range B2:B6 and select the "Conditional Formatting" option under the "Styles" group in the "Home" tab. And then choose the "New Rule".

Calculate 90 Days from Current Date in Excel1

Step 2 − In the "New Formatting Rule" dialog box, select "Use a formula to determine which cells to format". Then, type the formula "=B2=TODAY()+90" in the "Edit the Rule Description" section. Moreover, select the "Format" button.

Calculate 90 Days from Current Date in Excel2

Step 3 − Afterward, expand the Color: tile and select the desired color from the given list of Colors and then click the OK button.

Calculate 90 Days from Current Date in Excel3

Furthermore, click the OK button in the New Formatting Rule dialog box.

Calculate 90 Days from Current Date in Excel4

Step 4 − Therefore, the dates that meet the Rule are highlighted in the Red font.

Calculate 90 Days from Current Date in Excel5

Download Practice Sheet

You can download and use the sample data sheet to practice the TODAY function.

Advertisements