This is an overview.
The date format- MM/DD/YYYY was used.
Example 1 – Insert the Current Static Date Using a Keyboard Shortcut in Excel
- Select a cell to insert the current date and press CTRL+ ; (semi-colon): the current date will be displayed.
- Repeat the process for other cells.
Note: If you recalculate your workbook or reopen it on another day, it won’t update the date automatically.
Read More: How to Insert Date in Excel Formula
Example 2 – Use an Excel Function to Insert the Current Date (If the Worksheet Needs to Be Updated/Recalculated/Reopened)
2.1 Apply the TODAY Function to Insert the Current Date
- Enter the following formula in E5.
=TODAY()
- Drag down the Fill Handle to see the result in the rest of the cells.
Example 3 – Using the TODAY function.
3.1. Add or Subtract Days from the Current Date
You know the delivery day (either before or after) the current date. Calculate the delivery date.
- Enter the following formula in F5 and use the Fill Handle.
=TODAY()+E5
3.2. Calculate Months or Years from the Current Date
Calculating Months:
- In E5, enter the following formula and use the Fill Handle to get the output.
=DATEDIF(D5,TODAY(),"m")
- The TODAY function returns the current date. The DATEDIF function calculates the month numbers between the given date and the current date. “M” is used for month.
Calculating Years:
- To get the number of years, use the following formula:
=DATEDIF(D5,TODAY(),"y")
- This formula is similar to the previous one. “y” is used for year.
3.3. Calculate Age from Current Date
The dataset showcases employees’ years of birth. To calculate their ages, knowing the current date is 4/5/2023.
- Enter the formula in E5 and use the Fill Handle.
=YEAR(TODAY())-D5
- The TODAY function returns the current date. The YEAR function returns the year number from the current date. The year of birth year will be subtracted from it.
3.4. Calculate the Closest Date to the Current Date
The current date is 4/5/2023.
Closest Past Date:
- Enter the following formula in D15
=MAX(IF(D5:D13 < TODAY(),D5:D13))
Formula Breakdown
- TODAY()
returns the current date.
- IF(D5:D13 < TODAY(),D5:D13)
returns the dates less than the current date.
- MAX(IF(D5:D13 < TODAY(),D5:D13))
returns the nearest past date.
Closest Future Date:
- Use the following formula to get the closest future date from the current date.
=MIN(IF(D5:D13 > TODAY(), D5:D13))
Formula Breakdown
- TODAY()
returns the current date.
- IF(D5:D13 < TODAY(),D5:D13)
returns the dates greater than the current date.
- MAX(IF(D5:D13 < TODAY(),D5:D13))
will returns the nearest future date.
3.5. Get the Closest Date to Today
The current date is 4/5/2023.
- Enter the following formula in D15.
=INDEX(D5:D13,MATCH(MIN(ABS(D5:D13-TODAY())),ABS(D5:D13-TODAY()),0))
Formula Breakdown
- ABS(D5:D13-TODAY())
The TODAY function returns the current date. The date will be subtracted from every date and returned as an array. The ABS function returns the absolute value ignoring the negative sign.
- MIN(ABS(D5:D13-TODAY()))
The MIN function returns the minimum value in the array that will be the lookup value for the MATCH function.
- MATCH(MIN(ABS(D5:D13-TODAY())),ABS(D5:D13-TODAY()),0)
The MATCH function returns the index row number based on the selected range.
- INDEX(D5:D13,MATCH(MIN(ABS(D5:D13-TODAY())),ABS(D5:D13-TODAY()),0))
The INDEX function will returns a value according to the index number.
3.6. Use the NOW Function to Add Current Date in Excel
- Use the following formula in E5 and apply the Short Date format to display the date only.
=NOW()
Read More: How to Insert Dates in Excel Automatically
Example 3 – Apply the Power Query to Insert the Current Date
- Select the dataset and click: Data > From Table/Range.
- Click: Add Column > Custom Column.
- Name the column and enter the formula:
=DateTime.LoaclNow()
A column is added with the current date and time.
- Click Close & Load to display it in a new sheet.
- This is the final output:
Read More: Automatically Enter Date When Data Entered in Excel
Example 4 – Use a Power Pivot Calculated Column to Get Current Date
To activate the Power Pivot add-in:
- Open the Excel Options dialog box and click: Add-ins > COM Add-ins > Go.
- Check Microsoft Power Pivot for Excel and click OK.
- Select the dataset, click Add to Data Model in Power Pivot.
- Double-click Add Column and enter the new column Name. Here, Current Date.
- Enter the TODAY function in the first cell of the column.
=TODAY()
You will see the current date in the whole column.
Use the Power Pivot Measure to Get the Current Date
- Select the dataset range and click: Insert > PivotTable.
- Select the sheet option and check Add this to the Data Model >> click OK.
- Drag Project Name and Start Date to Rows, and Budget to Values.
- Click: Power Pivot > Measures > New Measure.
- The table name will be selected automatically, don’t change it.
- Enter a measure name and use the TODAY function in the formula section.
- Select Date in Category and a format in Format.
- The new measure is available in PivotTable Fields.
- Check it, and it will automatically add a new column to the Pivot Table with the current date.
How to Highlight Current Date in Excel?
- Select the date range and click: Home > Conditional Formatting > New Rule.
- Select Use a formula to determine which cells to format in Select a Rule Type.
- Enter the following formula and click Format.
=D5=TODAY()
- In Fill section, select a color and click OK.
- It will take you to the previous dialog box: click OK.
The current date is 4/5/2023, it is highlighted in light green.
Things to Remember
- The output of the TODAY and NOW functions update when the worksheet is recalculated or when a macro with these functions is run.The date and time will be taken from your computer’s system clock.
- You may need to alter the parameters that determine when the workbook or worksheet recalculates if the TODAY function does not update the date: click Options in the File tab. In Calculation options, select Automatic in Formulas.
- A decimal number is used to represent time values in a date value (for example, 12:00 PM is represented as 0.5: half a day).
- #VALUE! error occurs when the specified serial number is not a valid Excel time.
Frequently Asked Questions
1. How to Insert Current Time in Excel?
Press CTRL + SHIFT + ; or use the NOW function.
2. How to Insert Current Static Date and Time in Excel?
Press CTRL + ; and CTRL + SHIFT + ; to insert the current static date and time in a cell.
Download Practice Workbook
Download the practice workbook.
Related Articles
- How to Auto Populate Date in Excel When Cell Is Updated
- How to Perform Automatic Date Change in Excel Using Formula
- How to Insert Day and Date in Excel
- How to Get the Current Date in VBA
<< Go Back to Insert Date | Date-Time in Excel | Learn Excel
Get FREE Advanced Excel Exercises with Solutions!