Web Query Converts Numbers That Contain Hyphens into Dates (287027)



The information in this article applies to:

  • Microsoft Excel 2002

This article was previously published under Q287027

SYMPTOMS

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.

CAUSE

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.

RESOLUTION

To prevent Excel from automatically converting numbers to dates, follow these steps when you create a new Web query:
  1. On the Data menu, point to Import External Data, and then click New Web Query.
  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.

Modification Type:MinorLast Reviewed:11/5/2003
Keywords:kbprb KB287027