date format problems with export to csv



I use the TransferText method and export a query to .csv. In my query my
date field shows as "mm/dd/yy". When I look at the .csv file, it looks like
"mm/dd/yy 00:00". Does anyone know how to format it to stay the way it is in
the query. Here is my code that exports the query to .csv:

DoCmd.TransferText acExportDelim, "my export specification file", "query
name", "Path and folder directory\SPM.csv"

My export specification file was created using the File Export wizard...

Douglas J. Steele

In the query, use the Format function to format your date appropriately.
That will convert the value to a string, which Access should export

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question