logo
search
Pivot Table Issues

How to Convert an Excel Date to the Year Only for a Pivot Table

Elise WilliamsElise Williams Oct 9, 2026 869 views

Question details

The user needs to display only the year from date data in an Excel Pivot Table. Formatting the source data to 'yyyy' does not update the grouping, and using the YEAR function returns incorrect results like 1905.

How to Convert an Excel Date to the Year Only for a Pivot Table
Product
Excel
Device & OS
not provided
Scenario
Grouping or filtering data by year within a Pivot Table based on a source date column.
Observed behavior
The Pivot Table continues to display months and years instead of just years. Adjusting the date format to 'yyyy' fails to change the grouping, and applying the YEAR function on certain values yields 1905 instead of the correct year.
Before you start

Ensure your source data contains valid Excel date values rather than plain text strings, and clear any blank cells in the date column, as Pivot Tables rely on proper date serial numbers to group data accurately.

Solution 1Recommended

Use a Helper Column with the YEAR Function

Extract the year into a new column using the YEAR function to ensure the Pivot Table reads it as an independent numeric year value.

A Pivot Table reads the underlying value of a cell, not its display format. Changing the cell format to 'yyyy' only changes how it looks, not the actual date serial number. Creating a helper column provides the exact data the Pivot Table needs.

1
Create a Helper Column

Insert a new column next to your source data and name the header 'Year'.

2
Apply the YEAR Formula

Assuming your first date is in cell A2, click cell B2 and type `=YEAR(A2)`, then press Enter. Drag the fill handle down to apply this formula to the rest of the column.

3
Format as General

Select the new 'Year' column, right-click, select 'Format Cells', and change the format to 'General' to ensure it displays as a 4-digit number, not a date.

4
Update the Pivot Table

Go to your Pivot Table, click 'PivotTable Analyze' (or 'Options'), select 'Change Data Source' to include the new column, and drag the new 'Year' field into your Rows or Columns area.

Use a Helper Column with the YEAR Function
Why you might get 1905: If `=YEAR()` returns 1905, you are likely applying it to a cell that already contains the plain number 2015. Excel interprets the number 2015 as a date serial number (July 8, 1905). Ensure you are applying the formula to a complete, valid date (e.g., Nov 16, 2015).

Easily Manage Pivot Tables and Date Grouping in WPS Office

WPS Spreadsheet provides intuitive Pivot Table features, including automatic date grouping and robust formula support. You can effortlessly manage dates, extract years, and analyze your datasets without running into formatting errors.

  1. 1. Open your dataset: Launch WPS Spreadsheet and open your existing workbook containing the date values.
  2. 2. Use built-in grouping: Right-click a date directly inside your Pivot Table, select 'Group', and choose 'Years' to group without needing any formulas.
  3. 3. Apply helper formulas: If custom data extraction is needed, use standard formulas like =YEAR() or =TEXT() in a helper column, perfectly supported by WPS Spreadsheet.
  4. 4. Refresh and analyze: Click 'Refresh' on the Pivot Table menu to instantly apply your new year data for reporting.
Native support for Pivot Table date grouping and advanced filteringFully compatible with Microsoft Excel formulas and .xlsx filesBuilt-in smart date recognition to prevent text-format errorsLightweight, fast, and completely free alternative for data analysis
QA img-9

Frequently Asked Questions

Why does changing the date format to 'yyyy' not change the Pivot Table grouping?

Changing the cell format only alters how the data is visually displayed, not the underlying value. The Pivot Table still pulls the full underlying date serial number (e.g., day, month, and year). To group by year, you must either use the Pivot Table's 'Group' feature or create a helper column.

Why does the YEAR function return 1905 instead of the correct year?

This happens if you apply the YEAR function to a cell that contains just the number '2015'. Excel interprets 2015 as a date serial number corresponding to July 8, 1905, so the YEAR function returns 1905. Ensure the source cell is a complete, full date.

Can I group dates by year directly in the Pivot Table without adding a new column?

Yes. Right-click any date inside your Pivot Table, select 'Group', and highlight 'Years' (while deselecting 'Months' and 'Quarters' if necessary). Note that this built-in grouping will fail if your source date column contains blank cells or dates stored as text.