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.

Web query converts numbers that contain hyphens into dates in Excel

View products that this article applies to.


When you import data from a Web page by using a Web query, some numbers may be imported as dates. For example, when you import a table that contains win/loss statistics for sports teams, if a column contains the value 6-10, Excel imports that value as 10-Jun.

Note The date conversion may vary, depending on your regional settings in Control Panel.

↑ Back to the top


By default, when you create a new Web query, Microsoft Excel converts strings of two and three numbers that are separated by hyphens into dates.

↑ Back to the top


To prevent Excel from automatically converting numbers to dates, follow these steps when you create a new Web query:
  1. In Microsoft Office Excel 2003 or in Microsoft Excel 2002, point to Import External Data on the Data menu, and then click New Web Query.

    In Microsoft Office Excel 2007, click From Web in the Get External Data group on the Data tab.
  2. In the Address box, type the address of the Web page that contains the table that you want to import, and then click Go.
  3. Click the appropriate table marker to select the table that you want to import.
  4. Click Options.
  5. Under Other Import settings, click to select the Disable date recognition check box.
  6. Click OK two times to finish your Web query.
Excel now imports your data as text instead of dates.

↑ Back to the top

Keywords: KB287027, kbprb

↑ Back to the top

Article Info
Article ID : 287027
Revision : 3
Created on : 1/31/2007
Published on : 1/31/2007
Exists online : False
Views : 277