ACC2000: Exporting Date Fields to Text Includes Time FormatID: Q209268
|
When you export a table that includes a Date/Time field to a text file, Microsoft Access automatically adds the time format to the date in the exported text file. The Date/Time field appears in the text file in mm/dd/yy hh:nn:ss format.
Access stores date and time values for all date fields. When you export the data to a text file, Access exports both the date and the time. If there is no data for the time portion of a date, the time appears as 0:00:00, indicating 12 A.M.
There are two methods to work around this behavior.
Query: ExportDates
------------------------------------------------
Type: Select Query
Field: Birthday2: Format([Birthday], "mm/dd/yy")
NOTE: The calculated field name cannot match the name of any other field that is included in the query.
CAUTION: Following the steps in this example will modify the sample
database Northwind.mdb. You may want to back up the Northwind.mdb file
and perform these steps on a copy of the database.
Table: TestDate
--------------------
Field Name: Birthday
Data Type: Date/Time
04/19/93
For more information about exporting data to other file formats, click Microsoft Access Help on the
Help menu, type "exporting data, data formats" in the Office Assistant or the Answer Wizard,
and then click Search to view the topics returned.
Additional query words: prb
Keywords : kbusage kbdta IsmTxtd IsmTxtfx
Version : WINDOWS:2000
Platform : WINDOWS
Issue type : kbprb
Last Reviewed: June 10, 1999