Avatar of SteveL13
Flag for United States of America

asked on 

Export date field via a query to an Excel file

I am exporting a query result to an Excel file.  The query contains a date field.  The date field is Short Date by default.  But when for example 3/14/2017 gets exported to the Excel file it looks like 3/14/2017  12:00:00 AM

Why is this happening?

The export VBS code is:

DoCmd.TransferText acExportDelim, , "qryRecords", strCSV & Environ("userProfile") & "\Desktop\" & "Records " & Format(Now, "mm-dd-yyyy_hh-nn") & ".csv", True

Open in new window

Microsoft Access

Avatar of undefined
Last Comment
Gustav Brock

8/22/2022 - Mon