Excel: Converting Imported Text String to a Date

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 "Oct-91", 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.

REFERENCES

"Microsoft Excel User's Guide", version 3.0, pages 170-171


KBCategory: kbother
KBSubcategory:

Additional reference words: 2.10 2.10c 2.10d 3.00 2.20 2.21 2.1 2.1c 2.1d
2.2


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: November 3, 1994
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.