XL98: Programmatically Exporting Text File Truncates Dates

ID: Q247799


The information in this article applies to:
  • Microsoft Excel 98 Macintosh Edition


SYMPTOMS

When you programmatically save the contents of your Microsoft Excel worksheet, some dates that were stored with a four-digit year are truncated to two-digit years.


CAUSE

This behavior occurs when the following conditions are true:

  • You use the SaveAs method to save the contents of your Excel worksheet.

    -and-

  • You specify one of the following parameters for the FileFormat argument of the SaveAs method:

    • xlCSV
    • xlCSVMac
    • xlCSVMSDOS
    • xlCSVWindows
    • xlCurrentPlatformText
    • xlDIF
    • xlTextMac
    • xlTextMSDOS
    • xlTextPrinter
    • xlTextWindows

    -and-

  • The Show century setting in the Date & Time Control Panel is enabled.
By design, Excel uses the default short date style setting (m/d/yy) of the Mac OS to determine the format for exporting your worksheet to one of the file formats listed above. This maintains consistent, predictable automation results, regardless of locale settings.


RESOLUTION

To resolve this problem, download and install the Excel 98 Y2K Update. For additional information about how to download and install the Excel 98 Y2K Update, click the article number below to view the article in the Microsoft Knowledge Base:

Q249227 XL98: How to Obtain and Install the Excel 98 Y2K Update


MORE INFORMATION

Cells that contain custom formatting are not affected by this behavior.

For more information about how Microsoft products are affected by year 2000 (Y2K) issues, please see the following Microsoft World Wide Web site:

http://www.microsoft.com/year2000/

Additional query words: XL98 y2k

Keywords : kb2000 kbdtacode xlloadsave xlvbainfo
Version : MACINTOSH:98
Platform : MACINTOSH
Issue type : kbprb


Last Reviewed: December 29, 1999
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.