Exporting a .csv file

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.
 
K

Ken Snell [MVP]

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")
 
G

Guest

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.


.
 

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

Top