How to Insert the Current Date in Excel – 4 Examples

This is an overview.

1-Overview of how to insert current Date in Excel

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.

2-Inserting current date using shortcut keys

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)

Use the TODAY function or the NOW function and the Fill Handle tool.

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.

3-Using TODAY function to insert current date


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

4-Adding or Subtracting Days from the Current Date with TODAY function


3.2. Calculate Months or Years from the Current Date

Combine the DATEDIF and TODAY functions.

Calculating Months:

  • In E5, enter the following formula and use the Fill Handle to get the output.
=DATEDIF(D5,TODAY(),"m")

5-Combining DATEDIF and TODAY functions to calculate months from current date

  • 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")

6-Combining DATEDIF and TODAY functions to calculate years from current date

  • This formula is similar to the previous one. “y” is used for year.

3.3. Calculate Age from Current Date

Use the TODAY and the YEAR function.

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

7-Combining YEAR and TODAY functions to get age from current date

  • 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

Use the MAX, MIN, IF, and TODAY functions. The current date is 4/5/2023.

Closest Past Date:

  • Enter the following formula in D15
=MAX(IF(D5:D13 < TODAY(),D5:D13))

8-Combining MAX, IF and TODAY functions to calculate closest past date to current date

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))

9-Combining MIN, IF and TODAY functions to calculate closest future date to current date

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

Use the INDEX, MATCH, MIN, and ABS functions with the TODAY function. 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))

10-Joining INDEX, MATCH, MIN, ABS and TODAY functions to get the closest date to today

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

To return the current date, use the NOW function. It has no arguments.

  • Use the following formula in E5 and apply the Short Date format to display the date only.
=NOW()

11-Using NOW function to add current date in Excel

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.

12-Selecting From Table/Range option from Data menu

  • Click: Add Column > Custom Column.

13-Inserting custom column in Power Query

  • Name the column and enter the formula:
=DateTime.LoaclNow()

14-inserting custom column name and formula

A column is added with the current date and time.

  • Click Close & Load to display it in a new sheet.

15-Output after inserting current date in Power Query

  • This is the final output:

16-Output in a new sheet

Read More: Automatically Enter Date When Data Entered in Excel


Example 4 – Use a Power Pivot Calculated Column to Get Current Date

You may not have the Power Pivot add-in by default. To activate it:

  • Open the Excel Options dialog box and click: Add-ins > COM Add-ins > Go.

17-Opening Com Add-ins from Add-ins option

  • Check Microsoft Power Pivot for Excel and click OK.

18-Marking Microsoft Power Pivot for Excel Add-in

  • Select the dataset, click Add to Data Model in Power Pivot.

19-Selecting Add to Data Model option from Power Pivot Add-in

  • Double-click Add Column and enter the new column Name. Here, Current Date.

20-Adding a new column in Power Pivot

  • Enter the TODAY function in the first cell of the column.
=TODAY()

You will see the current date in the whole column.

21-Inserting TODAY function in Power Pivot


Use Power Pivot Measure to Get the Current Date

There’s another option in Power Pivot named Measures. This feature can also insert the current date. Create a Pivot Table.

  • Select the dataset range and click: Insert > PivotTable.

22-Inserting a Pivot Table

  • Select the sheet option and check Add this to the Data Model >> click OK.

23-Selecting sheet option and marking Add this data to the Data Model option

  • Drag Project Name and Start Date to Rows, and Budget to Values.
  • Click: Power Pivot > Measures > New Measure.

24-Selecting New Measure option from Power Pivot menu

  • 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.

25-Giving measure name and inserting TODAY function with date 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.

26-Output of current date using measure


How to Highlight Current Date in Excel?

  • Select the date range and click: Home > Conditional Formatting > New Rule.

27-Selecting New Rule option from Conditional Formatting menu

  • Select Use a formula to determine which cells to format in Select a Rule Type.
  • Enter the following formula and click Format.
=D5=TODAY()

28-Inserting custom rule with TODAY function

  • In Fill section, select a color and click OK.

29-Selecting conditional formatting fill color

  • It will take you to the previous dialog box: click OK.

30-Finishing of inserting new rule and fill color

  • The current date is 4/5/2023, it is highlighted in light green.

31-Output after applying conditional formatting


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


<< Go Back to Insert Date | Date-Time in Excel | Learn Excel

Get FREE Advanced Excel Exercises with Solutions!
Bhubon Costa
Bhubon Costa

Bhubon Costa, B.Sc. in Naval Architecture & Marine Engineering from Bangladesh University of Engineering & Technology, has worked with the ExcelDemy since 2021. Currently, he has been working as a reviewer. Notably, he has written over 90 articles and led several VBA content development teams. He has a great passion for the fields of data analytics and data science. His areas of expertise include Excel VBA, Power Query, Pivot Table, Power BI, MySQL, PostgreSQL, machine learning, and Python... Read Full Bio

We will be happy to hear your thoughts

Leave a reply

Advanced Excel Exercises with Solutions PDF

 

 

ExcelDemy
Logo