Exporting a .csv file

  • Thread starter Thread starter Roger
  • Start date Start date
R

Roger

I have data I need to export to a .csv file. I write the
data to a temporary table then export it to the .csv file
using a macro. The problem I am having is with the date
format. It looks fine in the temp table I have the row
formatted with "short date". When I open the file in excel
the date looks something like this"9/14/04 00:00:00" SO
that's my problem any suggestions on how I can fix the
problem.
 
Use a query as the source of the exported data, not the table. In the query,
replace the table's field with a calculated field that formats the output
the way you want it:

MyOutput: Format([FieldName], "mm/dd/yyyy")
 
Thanks it worked perfect!

-----Original Message-----
Use a query as the source of the exported data, not the table. In the query,
replace the table's field with a calculated field that formats the output
the way you want it:

MyOutput: Format([FieldName], "mm/dd/yyyy")

--

Ken Snell
<MS ACCESS MVP>

Roger said:
I have data I need to export to a .csv file. I write the
data to a temporary table then export it to the .csv file
using a macro. The problem I am having is with the date
format. It looks fine in the temp table I have the row
formatted with "short date". When I open the file in excel
the date looks something like this"9/14/04 00:00:00" SO
that's my problem any suggestions on how I can fix the
problem.


.
 
Back
Top