Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

XL2000: Early Dates on Office Spreadsheet Component Differ from Excel


View products that this article applies to.

Symptoms

In the Microsoft Office Spreadsheet Component, when you type a value between 0 and 60 in a cell, and then format the cell using a date format, you see a different date than you would if you typed the same value in Microsoft Excel. Or, if you type an early date in the Office Spreadsheet Component and then click Export to Excel, the date in Excel may be different by one day.

For example, the following table illustrates date values and their corresponding dates in both the Microsoft Office Spreadsheet Component and Microsoft Excel:
   Value      Office Spreadsheet      Microsoft Excel
   ----------------------------------------------------

    0         December 30, 1899       January 0, 1900
    1         December 31, 1899       January 1, 1900
   60         February 28, 1900       February 29, 1900
   61         March 1, 1900           March 1, 1900
				

↑ Back to the top


Cause

In the Microsoft Office Spreadsheet Component, the value 0 evaluates to the date December 30, 1899 and the value 1 evaluates to December 31, 1899. This is different from Microsoft Excel. In Excel, the value 0 evaluates to January 0, 1900 and the value 1 evaluates to January 1, 1900. The date January 0, 1900 does not exist in the Microsoft Office Spreadsheet Component.

In addition, the Office Spreadsheet Component does not recognize the year 1900 as a leap year. After March 1, 1900, however, dates in the Microsoft Office Spreadsheet Component and Microsoft Excel begin to match.

↑ Back to the top


Workaround

For additional information about dates in the Microsoft Office Spreadsheet Component, click the article number below to view the article in the Microsoft Knowledge Base:
210782 OFF2000: Dates Prior to 1900 Allowed in Office Spreadsheet

↑ Back to the top


Keywords: KB205719, kbprb

↑ Back to the top

Article Info
Article ID : 205719
Revision : 3
Created on : 10/7/2003
Published on : 10/7/2003
Exists online : False
Views : 354