Export Table to Text File (*.csv) Error

S

stevieb

Hello,

I Currently have a table that has dates setup as mm/dd/yyyy. But when i go
to export, the date shows up incorrectly with an attached time.

ie.
I want this:
Col1 | Col2
Name1 | 01/01/2001

But it exports as this:
Col1 | Col2
Name1 | 1/1/2001 000000

For some reason it changes the date format and adds in a time.

Thanks
 
D

Douglas J. Steele

It's not actually changing anything. Date fields always contain time as
well: it's a function of how dates are stored (they're eight byte floating
point numbers where the integer portion represents the date as the number of
days relative to 30 Dec, 1899, and the decimal portion represents the time
as a fraction of a day)

To avoid this, create a query and use the Format function (as opposed to
setting the Format property) on the date field. Export the query rather than
the table.
 

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