Change the date system, format, or two-digit year interpretation

Dates are often a critical part of data analysis. You often ask questions such as: when was a product purchased, how long will a task in a project take, or what is the average revenue for a fiscal quarter? Entering dates correctly is essential to ensuring accurate results. But formatting dates so that they are easy to understand is equally important to ensuring correct interpretation of those results.

 Important   Because the rules that govern the way that any calculation program interprets dates are complex, you should be as specific as possible about dates whenever you enter them. This will produce the highest level of accuracy in your date calculations.

What do you want to do?


Learn about date calculations and formats

Microsoft Office Excel stores dates as sequential numbers that are called serial values. For example, in Microsoft Office Excel for Windows, January 1, 1900 is serial number 1, and January 1, 2008 is serial number 39448 because it is 39,448 days after January 1, 1900. Office Excel stores times as decimal fractions because time is considered a portion of a day. The decimal number is a value ranging from 0 (zero) to 0.99999999, representing the times from 0:00:00 (12:00:00 A.M.) to 23:59:59 (11:59:59 P.M.).

Because dates and times are values, they can be added, subtracted, and included in other calculations. You can view a date as a serial value and a time as a decimal fraction by changing the format of the cell that contains the date or time to General format.

For more information, see the following help topics:

Top of Page Top of Page

Learn about the two date systems

Both Microsoft Excel for the Macintosh and Excel for Windows support the 1900 and 1904 date systems. The default date system for Microsoft Office Excel for Windows is 1900; and the default date system for Microsoft Office Excel for the Macintosh is 1904.

Originally, Excel for Windows was based on the 1900 date system, because it enabled better compatibility with other spreadsheet programs that were designed to run under MS-DOS and Microsoft Windows, and therefore it became the default date system. Originally, Microsoft Excel for the Macintosh was based on the 1904 date system, because it enabled better compatibility with early Macintosh computers that did not support dates before January 2, 1904, and therefore it became the default date system.

The following table shows the first date and the last date for each date system and the serial value associated with each date.

Date system First date Last date
1900 January 1, 1900
(serial value 1)
December 31, 9999
(serial value 2958465)
1904 January 2, 1904
(serial value 1)
December 31, 9999
(serial value 2957003)

Because the two date systems use different starting days, the same date is represented by different serial values in each date system. For example, July 5, 2007 can have two different serial values, depending on the date system that is used.

Date system Serial value of July 5, 2007
1900 37806
1904 39268

The difference between the two date systems is 1,462 days; that is, the serial value of a date in the 1900 date system is always 1,462 days greater than the serial value of the same date in the 1904 date system. Conversely, the serial value of a date in the 1904 date system is always 1,462 days less than the serial value of the same date in the 1900 date system. 1,462 days is equal to four years and one day (which includes one leap day).

Top of Page Top of Page

Change the way two-digit years are interpreted

 Important   To ensure that year values are interpreted as you intended, type year values as four digits (for example, 2001, not 01). By entering four-digit years, Excel won't interpret the century for you.

If you enter a date with a two-digit year in a text formatted cell or as a text argument in a function, such as =YEAR("1/1/31"), Excel interprets the year as follows:

  • 00 through 29     is interpreted as the years 2000 through 2029. For example, if you type the date 5/28/19, Excel assumes the date is May 28, 2019.
  • 30 through 99     is interpreted as the years 1930 through 1999. For example, if you type the date 5/28/98, Excel assumes the date is May 28, 1998.

In Microsoft Windows, you can change the way two-digit years are interpreted for all Microsoft Windows programs that you have installed.

  1. Click the Start button, and then click Control Panel.
  2. Do one of the following:
    • In Windows Vista, click Clock, Language, and Region.
    • In Windows XP, click Date, Time, Language, and Regional Options.
  3. Click Regional and Language Options.
  4. Do one of the following:
    • In Windows Vista, in the Regional and Language Options dialog box, click the Formats tab.
    • In Windows XP, in the Regional and Language Options dialog box, click the Regional Options tab.
  5. Do one of the following:
    • In Windows Vista, click Customize this format.
    • In Windows XP, click Customize.
  6. Click the Date tab.
  7. In the When a two-digit year is entered, interpret it as a year between box, change the upper limit for the century.

As you change the upper-limit year, the lower-limit year automatically changes.

Top of Page Top of Page

Change the default date format to display four-digit years

By default, as you enter dates in a workbook, the dates are formatted to display two-digit years. When you change the default date format to a different format by using this procedure, the display of dates that were previously entered in your workbook will change to the new format as long as the dates haven't been formatted by using the Format Cells dialog box (On the Home tab, in the Number group, click the Dialog Box Launcher).

  1. Click the Start button, and then click Control Panel.
  2. Do one of the following:
    • In Windows Vista, click Clock, Language, and Region.
    • In Windows XP, click Date, Time, Language, and Regional Options.
  3. Click Regional and Language Options.
  4. Do one of the following:
    • In Windows Vista, in the Regional and Language Options dialog box, click the Formats tab.
    • In Windows XP, in the Regional and Language Options dialog box, click the Regional Options tab.
  5. Do one of the following:
    • In Windows Vista, click Customize this format.
    • In Windows XP, click Customize.
  6. Click the Date tab.
  7. In the Short date format list, click a format that uses four digits for the year ("yyyy").

Top of Page Top of Page

Change the date system

The date system changes automatically when you open a document from another platform. For example, if you are working in Excel for Windows and you open a document that was created in Excel for the Macintosh, the 1904 date system check box is selected automatically.

You can change the date system by doing the following:

  1. Click the Microsoft Office Button Button image, click Excel Options, and then click the Advanced category.
  1. Under the When calculating this workbook section, select the workbook that you want, and then select or clear the Use 1904 date system check box.

Top of Page Top of Page

Issue: I'm having problems with dates between workbooks that use different date systems

You can encounter problems when you copy and paste dates or when you create external references between workbooks based on the the two different date systems. Dates can appear four years and one day earlier or later than the date that you expect. You can encounter these problems whether you are using Microsoft Excel for Windows, Excel for the Macintosh, or both programs.

For example, if you copy the date July 5, 2007 from a workbook that uses the 1900 date system and then paste the date into a workbook that uses the 1904 date system, the date appears as July 6, 2011, which is 1462 days later. Alternatively, if you copy the date July 5, 2007 from a workbook that uses the 1904 date system and then paste the date into a workbook that uses the 1900 date system, the date appears as July 4, 2003, which is 1462 days earlier. For background information, see Learn about the two date systems .

Correct a copy and paste problem    

  1. In an empty cell, enter the value 1462.
  2. Select that cell, and then on the Home tab, in the Clipboard group, click Copy.
  3. Select all of the cells that contain the incorrect dates.

ShowHow to select cells

To select Do this
A single cell Click the cell, or press the arrow keys to move to the cell.
A range of cells

Click the first cell in the range, and then drag to the last cell, or hold down SHIFT while you press the arrow keys to extend the selection.

You can also select the first cell in the range, and then press F8 to extend the selection by using the arrow keys. To stop extending the selection, press F8 again.

A large range of cells Click the first cell in the range, and then hold down SHIFT while you click the last cell in the range. You can scroll to make the last cell visible.
All cells on a worksheet

Click the Select All button.

Select All button

To select the entire worksheet, you can also press CTRL+A.

 Note   If the worksheet contains data, CTRL+A selects the current region. Pressing CTRL+A a second time selects the entire worksheet.

Nonadjacent cells or cell ranges

Select the first cell or range of cells, and then hold down CTRL while you select the other cells or ranges.

You can also select the first cell or range of cells, and then press SHIFT+F8 to add another nonadjacent cell or range to the selection. To stop adding cells or ranges to the selection, press SHIFT+F8 again.

 Note   You cannot cancel the selection of a cell or range of cells in a nonadjacent selection without canceling the entire selection.

An entire row or column

Click the row or column heading.

Worksheet showing row heading and column heading

Callout 1 Row heading
Callout 2 Column heading

You can also select cells in a row or column by selecting the first cell and then pressing CTRL+SHIFT+ARROW key (RIGHT ARROW or LEFT ARROW for rows, UP ARROW or DOWN ARROW for columns).

 Note   If the row or column contains data, CTRL+SHIFT+ARROW key selects the row or column to the last used cell. Pressing CTRL+SHIFT+ARROW key a second time selects the entire row or column.

Adjacent rows or columns Drag across the row or column headings. Or select the first row or column; then hold down SHIFT while you select the last row or column.
Nonadjacent rows or columns Click the column or row heading of the first row or column in your selection; then hold down CTRL while you click the column or row headings of other rows or columns that you want to add to the selection.
The first or last cell in a row or column Select a cell in the row or column, and then press CTRL+ARROW key (RIGHT ARROW or LEFT ARROW for rows, UP ARROW or DOWN ARROW for columns).
The first or last cell on a worksheet or in a Microsoft Office Excel table

Press CTRL+HOME to select the first cell on the worksheet or in an Excel list.

Press CTRL+END to select the last cell on the worksheet or in an Excel list that contains data or formatting.

Cells to the last used cell on the worksheet (lower-right corner) Select the first cell, and then press CTRL+SHIFT+END to extend the selection of cells to the last used cell on the worksheet (lower-right corner).
Cells to the beginning of the worksheet Select the first cell, and then press CTRL+SHIFT+HOME to extend the selection of cells to the beginning of the worksheet.
More or fewer cells than the active selection Hold down SHIFT while you click the last cell that you want to include in the new selection. The rectangular range between the active cell (active cell: The selected cell in which data is entered when you begin typing. Only one cell is active at a time. The active cell is bounded by a heavy border.) and the cell that you click becomes the new selection.

 Tip   To cancel a selection of cells, click any cell on the worksheet.


  1. On the Home tab, in the Clipboard group, click Paste, and then click Paste Special.

Excel Ribbon Image

  1. In the Paste Special dialog box, under Paste, click Values, and then under Operation, do one of the following:
    • To set the date as four years and one day later, click Add.
    • To set the date as four years and one day earlier, click Subtract.

Correct an external reference problem    

If you are using an external reference to a date in another workbook with a different date system, you can modify the external reference by doing one of the following:

  • To set the date as four years and one day later, add 1462 to it. For example:
=[Book2]Sheet1!$A$1+1462
  • To set the date as four years and one day earlier, subtract 1462 from it. For example:
=[Book1]Sheet1!$A$1-1462
 
 
Applies to:
Excel 2007