The information in this article applies to:
SYMPTOMSIn Microsoft Excel, when you retrieve Microsoft Access data from Microsoft Query, if a date/time field contains a time without a date, the data in that field will be returned with a date of 12/30/1899. This presents a problem when the data is returned to Microsoft Excel because Microsoft Excel does not recognize dates earlier than 1900. Microsoft Excel interprets the data as text rather than Date/Time values, and you cannot successfully apply a date or time number format to the data in Microsoft Excel. CAUSEThese results are by design. When you create a time or date format in Microsoft Access, the program internally stores both the date and time. However, Microsoft Access masks the date or the time depending on the format you choose. So, in a Time format, it must store some date. The date it uses as a "dummy" date is '1899-12-30'. WORKAROUNDTo work around this problem, use either of the following methods. Method 1: In Microsoft Query, change the date from 12/30/1899 to 1/1/1900, which is a valid date in Microsoft Excel.Method 2: In Microsoft Excel, convert the values to valid Date/Time values once the data has been retrieved to Microsoft Excel. For example, you could do the following to convert the returned values to dates by using the Replace command to replace the date 12/30/1899 with a valid date: Additional query words: 5.00c MSQuery XL5 XL7
Keywords : xlquery |
Last Reviewed: October 7, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |