XL: Dates in Pivot Table May Be Converted into Text

Last reviewed: February 2, 1998
Article ID: Q109420
The information in this article applies to:
  • Microsoft Excel for Windows, versions 5.0, 5.0c
  • Microsoft Excel for the Macintosh, versions 5.0, 5.0a
  • Microsoft Excel for Windows NT, version 5.0
  • Microsoft Excel for Windows 95, version 7.0

SUMMARY

In the versions of Microsoft Excel listed in the beginning of this article, when you create a PivotTable that uses dates as row or column fields, the dates are converted to text. Because of this conversion, you may have difficulty sorting or otherwise manipulating these dates.

NOTE: This behavior may also occur when you use time values or data formatted with the Zip Code format (in Microsoft Excel version 7.0) as row or column fields. In this case, with data formatted with the Zip Code format in Microsoft Excel version 7.0, any leading zeros in the zip codes will be lost.

MORE INFORMATION

This behavior occurs because Microsoft Excel assumes that PivotTable labels are only used as text labels; therefore, Microsoft Excel converts all the labels to text before placing them in the PivotTable.

If you use dates in the row or column fields, they are converted into text strings that resemble dates. To convert these text versions of dates (or times) back into dates (or times), follow these steps:

  1. In a blank cell, type "1" (without the quotation marks).

  2. Copy this cell by clicking Copy on the Edit menu.

  3. Select the cells that contain the dates that you want to convert.

  4. On the Edit menu, click Paste Special.

  5. In the Paste Special dialog box, under Paste, click Values, and under Operation, click Multiply. Click OK.

    The dates appear as serial numbers (32645, 32647, and so on).

  6. On the Format menu, click Cells.

  7. Select the Number tab.

  8. In the list of Format Codes, click the date format you want.

  9. Click OK to accept the change.

The text versions of the dates are converted to dates that you can sort and format.

REFERENCES

"User's Guide," version 5.0, pages 470-474


Additional query words: 7.00 5.00
Keywords : xlformat xlpivot kbtool
Version : WINDOWS: 5.0, 5.0c, 7.0; MACINTOSH: 5.0, 5.0a
Platform : MACINTOSH WINDOWS
Issue type : kbprb


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: February 2, 1998
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.