Exporting a date field

B

Ben

Hi all -

I have in my code to export a query into a txt file:

DoCmd.TransferText acExportDelim, , MyQueryName, FileName, True


There are two fields in the query which are of date type, but when I
open the txt file, Access added the time like this: 2/27/2009 0:00:00,

What do I need to do to get rid of the 0:00:00?

Thanks,

Ben
 
J

Jim Burke in Novi

In the query, use something like

MyDate: Format(YourDateField, "MM/DD/YYYY")
 
B

Ben

Jim,

That worked out very well. Silly me, I should have thought of that.

Thanks again.

Ben
 

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