ACC: Import/Export Accepts Only 24-Hour Time Format

Last reviewed: June 6, 1997
Article ID: Q89618
The information in this article applies to:
  • Microsoft Access versions 1.0, 1.1, 2.0, 7.0, 97

SYMPTOMS

Moderate: Requires basic macro, coding, and interoperability skills.

When you import or export time values, Microsoft Access only works with 24-hour time values. For example, if you export a value such as 1:00 P.M. to an ASCII text file, the value will be exported in the 24-hour format as 13:00.

RESOLUTION

To work around this behavior when you export data, you can use the methods described in the following article in the Microsoft Knowledge Base:

   ARTICLE-ID: Q103174
   TITLE     : ACC: Exporting Date Fields to Text Includes Time Format

To work around this behavior when you import data, import the Date/Time data into a Text field. Then you can use an update query or Visual Basic code (or Access Basic code in versions 1.x and 2.0) to manipulate the values into the correct format for your Date/Time field.

MORE INFORMATION

If you try to import a time value such as 1:00 P.M. into an existing Date/Time field, the record will not be imported and you will receive an Import Errors table that shows a "Type Conversion Failure" for the value. To import a time value such as 1:00 P.M. into a Date/Time field, the value must be in the 24-hour format (in this case, 13:00).


Additional query words: military clock
Keywords : IntpOff IsmGnrl kbinterop
Version : 1.0 1.1 2.0 7.0 97
Platform : WINDOWS
Hardware : x86
Issue type : kbprb
Resolution Type : kbworkaround


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