Microsoft KB Archive/78117

{| = Excel: Converting Imported Text String to a Date =
 * width="100%"|

Last reviewed: November 3, 1994

Article ID: Q78117

SUMMARY
When dates are imported from applications such as dBASE, Symphony, or mainframe applications, they often import as text and must be converted to a date before Excel can use them in calculations or in database functions.

MORE INFORMATION
The imported value may appear to be an acceptable date, such as Oct-91. However, if you look at the value of the given cell by choosing Show Info from the Window menu, the value is actually enclosed in quotation marks &quot;Oct-91&quot;, indicating that it is actually a text string.

Re-evaluating the cell by selecting it, pressing F2 to activate the formula bar, and pressing ENTER will cause the text to convert to a value. However, if you have a range of cells containing dates to be converted, this method can be cumbersome. You can re-evaluate a range of cells easily by performing the following steps:


 * 1) Select the cell (or range of cells).
 * 2) From the Formula menu, choose Replace.
 * 3) Enter a hyphen (-) in both the Find What box and the Replace With box.
 * 4) Select Replace All.

Replacing the hyphen forces Excel to re-evaluate the content of the cells and therefore recognize it as a date.