XL2000: Century Year Changes When Saved as Text File Format (230931)
The information in this article applies to:
This article was previously published under Q230931 SYMPTOMS
When you open a text file that you saved in Microsoft Excel, dates in the file may have an incorrect year. For example, if the date you saved was 1/1/2125, it may change to 1/1/2025 after you reopen the text file in Excel.
CAUSE
This problem occurs when you do the following:
- You type a date in a cell with a year greater than 2000.
- You format the cell to show only a two-digit year.
- You save the file as any of the following text file formats:
- Text (tab delimited) (*.txt)
- Unicode text (*.txt)
- CSV (comma delimited) (*.csv)
- Formatted Text (space delimited) (*.prn)
- Text (Macintosh) (*.txt)
- Text (MS-DOS) (*.txt)
- CSV (Macintosh) (*.CSV)
- CSV (MS-DOS) (*.CSV)
- DIF (data interchange format) (*.dif)
WORKAROUND
To save dates with the intended year in text files, format the cell to show four digits for the year:
- Select the cells that you want to format.
- On the Format menu, click Cells, and then click the Number tab.
- In the Category list, click Custom, and type mm/dd/yyyy in the Type box. Then, click OK.
Modification Type: | Minor | Last Reviewed: | 6/26/2003 |
---|
Keywords: | kbpending kbprb KB230931 |
---|
|