Formatting Issues

Excel: Insert the Current Date and Time in a Header or Footer

Maira MehtabMaira Mehtab Nov 12, 2026 870 views

Question details

The user needs to insert the current date and time into an Excel header or footer.

Product
Microsoft Excel
Device & OS
not provided
Scenario
The worksheet needs a printable header or footer that automatically displays the current date and time.
Observed behavior
Excel inserts the date and time using the computer’s regional settings rather than the worksheet cell’s number format. Excel does not provide a separate header or footer time-format control.
Before you start

Decide whether the header or footer should show the date, the time, or both. If the time must include AM/PM, check the computer’s regional time format before inserting the field.

Solution 1Recommended

Insert the current date and time from Excel Header & Footer tools

Use this method when you want Excel to update the printable header or footer automatically with the current date and time.

Excel inserts dynamic header and footer fields rather than a fixed text value. The date and time display is controlled by the computer’s regional settings, not by the worksheet’s cell formatting.

1
Open the header or footer

Switch to View > Page Layout, then click inside the top header area or bottom footer area of the worksheet.

2
Open the Header & Footer tab

After clicking the header or footer, select the Header & Footer tab on the Excel ribbon.

3
Insert the date or time

In the Header & Footer Elements group, click Current Date to insert the date field or Current Time to insert the time field. You can insert both in the same header or footer.

4
Set the AM/PM display if needed

If the time does not show AM/PM, open your computer’s regional date and time settings and choose a 12-hour time format. Excel has no separate header or footer time-format setting.

Dynamic fields: The inserted fields update when the workbook is recalculated or printed, while the exact display format follows the computer’s regional settings.

Add a Dynamic Date and Time to a WPS Spreadsheet Header or Footer

WPS Spreadsheet lets you edit the page header or footer and insert dynamic date and time fields for printed worksheets. Its familiar page layout tools make it easy to position and review these fields before printing.

  1. 1. Open the page layout tools: Open the workbook in WPS Spreadsheet and choose Page Layout view or open the Page Setup dialog from the Page Layout tab.
  2. 2. Edit the header or footer: Select Header and Footer, then click the header or footer section where the current date or time should appear.
  3. 3. Insert the date and time fields: Use the Header & Footer tools to select Current Date and Current Time, or insert the corresponding dynamic fields when those buttons are available.
  4. 4. Check and print the result: Return to Page Layout view or open File > Print to verify the position and appearance of the dynamic date and time.
Insert dynamic date and time fields directly into a spreadsheet header or footer.Review header and footer placement in Page Layout view before printing.Use a lightweight spreadsheet editor with a familiar Office-style interface.Open and save Microsoft Excel XLS and XLSX files with broad format compatibility.
QA img-9

Frequently Asked Questions

How do I insert only the current date in an Excel header?

Open View > Page Layout, click the header, select the Header & Footer tab, and click Current Date in the Header & Footer Elements group.

How do I add the current time to an Excel footer?

Click the footer in Page Layout view, open the Header & Footer tab, and select Current Time. Excel inserts a dynamic time field in the selected footer section.

Why does the Excel header time not match the worksheet cell format?

Header and footer fields use the computer’s regional date and time settings. They do not inherit the number format applied to worksheet cells.

Can Excel show AM/PM in a header or footer time?

Yes, but Excel does not provide a separate header or footer time-format setting. Change the computer’s regional time format to a 12-hour format with AM/PM, then review the header or footer.

What are the Excel codes for the current date and time fields?

The current date field is &[Date], and the current time field is &[Time]. You can insert them with Excel’s Current Date and Current Time buttons or use them in a custom header or footer.