The TODAY function is beneficial when we require to have the current date illustrated on a worksheet instead of opening the workbook. It is also beneficial for determining intervals. This function is important for calculating people’s age automatically. In this article, I will share the basics of the TODAY function and its uses.
INDEX Function in Excel: Array Form (Quick View)
Download the Practice WorkBook
Excel TODAY Function: Syntax & Arguments
Summary
The TODAY function returns the current date formatted as a date.
Syntax
=TODAY()
As we can see from the above picture the TODAY function doesn’t take any argument in its parameter.
Note:Â
- The TODAY function delivers the current date and will frequently refresh each time the worksheet is updated or refreshed. Use F9 to fix the worksheet to recalculate and update the value.
- By default, this function returns the date as standard Excel date format. You can easily change the format by using the Format option as per your requirements.
How to Use the TODAY Function in Excel (6 Examples)
Example 1: Finding the Difference between Days using the TODAY Function
We can easily find out the difference between days from any specific date and today using this function. Let’s have a dataset of products with their ID, Names, Price, and Delivery Date. Now we will find out the due days from the delivery date to today.
Step 1: Enter the formula in cell F4 and copy it down up to F11
=TODAY()-E4
[ Note: Make sure Due days column is in General Format]
Example 2: Find Months since or before a Certain Date Using the TODAY Function
Now we will see how to get a number of months difference using the TODAY function. For this, we will need another function to call the DATEDIF function.
DATEDIF(start_date,end_date,unit)
This is the syntax of the DATEDIF function.
Argument | Required or Optional | Value |
start_date | Required | The date that describes the first, or starting date of a given term. Dates may be inserted as text strings within quotation marks. Like this “2012/8/15”) |
end_date | Required | A date that describes the last, or ending, date of the session. |
unit | Required | The type of information that we want to be returned, where
“Y” —-> The number of complete years in the period. “M” —->The number of complete months in the period. “D”—->The number of days in the period. |
Now let’s say we will find out the Due months from the delivery dates using the same dataset above.
Step 1: Enter the formula in cell F4 and copy it down up to F11
=DATEDIF(E4,TODAY(),"m")
Formula Explanation
- As all dates starting from the E4 cell that’s why E4 is passed as the first argument.
- Our end date will be today, and we have assigned it using the TODAY function.
- As we want to return the months, “m” is used to get the number of complete months in the period.
[ Note: Make sure Due days column is in General Format]
Example 3: Find Years since / before a Certain Date Using TODAY Function
Let’s do the same thing which was done in example 2 but here instead of calculating months we will calculate years. We need to change our dataset for this example. Here we will have new columns named Received Date and Stored Time (Year).
Step 1: Enter the formula in cell F4 and copy it down up to F11
=DATEDIF(E4,TODAY(),"y")
Formula Explanation
- All the arguments same as example 2 and “y” are used to get the number of years over the period.
[ Note: Here in the cell F6, 0 is printed as the received date’s year is 2021, and the difference between Today and 8/1/2021 is 0]
Read more: How to Use the DATEDIF Function in Excel
Example 4: Get an Age from Birthdate Using TODAY Function
Let’s have a dataset of office employees. In the dataset, we have ID, Name, Birthday. But we want to find out the current Age of each employee. Let’s see how to do this:
Step 1: Enter the formula in cell E4 and copy it down up to E12
=YEAR(TODAY())-YEAR(D4)
- YEAR(TODAY()) this portion extracts the year from the current date and YEAR(D4) this is from the birthday.
- Lastly, YEAR(TODAY())-YEAR(D4) this formula will determine the year differences.
[ Note: Make sure Due days column is in General Format]
Example 5: Highlight Today’s Date in Excel Using TODAY Function
Now let’s see how we can highlight today’s dates. For this let’s consider the same dataset used in example 3. But here we will only highlight those dates which are equal to today’s date. For this, we will use conditional formatting.
Step 1: Select the dates
Step 2: Go to the Home tab and select Conditional Formatting under the Styles section
Step 3: Select the New Rules option
Step 4: Now follow the steps:
- Select the marked 1 option.
- Enter the below formula in the marked section
=E4=TODAY()
- Then press the OK button.
Step 5: Now see the result
Example 6: Get Any Date Closest to Today Using TODAY Function
Now let’s see how we can get the closest date from any dataset. Again, for this, we will consider the same dataset above.
Step 1: Enter the formula in cell D14 and press Ctrl + Shift + Enter (As this is an array formula)
=INDEX($E$4:$E$11, MATCH(MIN(ABS($E$4:$E$11 - TODAY())), ABS($E$4:$E$11 - TODAY()), 0))
Formula Explanation
- ABS($E$4:$E$11 – TODAY()) This will find the difference between given dates and today’s date and returns an absolute difference.
- MATCH(MIN(ABS($E$4:$E$11 – TODAY())) this sub formula matches the minimum absolute difference.
- Lastly, $E$4:$E$11 is the data range where we will try to find the index value.
- Are you interested to learn more about the INDEX function?
Then visit this link to explore this powerful function.
Shortcuts of TODAY’s Function in Excel
Sometimes shortcuts save our time. Shortcuts are useful when we need to do a lot of things in a short time. Here we will see the steps of shortcut steps to define the TODAY function in Excel.
For Current Date
For this first press, the Ctrl button and then the ; (semi-colon) button
Ctrl + ;
For Current Time
For this first press, the Ctrl button then Shift button, and then the ; (semi-colon) button
Ctrl + Shift + ;
For Current Time
First press, the Ctrl button and then the ; (semi-colon) button then space after that first press, the Ctrl button then Shift button, and then the ; (semi-colon) button
Ctrl + ;   Space then   Ctrl + Shift + ;
Things to Remember
- Make sure your cell is in the correct date format to use the TODAY function. You can check this link to see different ways to format your dates.
- If the start_date is formulated in an invalid format then, the EOMONTH function will return #VALUE! indicating an error in the value.
- Make sure your cells are in general format when you are calculating days, months, or years. Otherwise, it will return dates that are not correct for this kind of situation.
Conclusion
This is all about the TODAY function and its different applications. Overall, in terms of working with time, we need this function for various purposes. I have shown all the methods with their respective examples but there can be many other iterations depending on numerous situations. If you have any other method of achieving this, then please feel free to share it with us.