date format problems with export to csv

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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...
 
In the query, use the Format function to format your date appropriately.
That will convert the value to a string, which Access should export
correctly.
 
Back
Top