Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Date/Time problems when exporting tables to text files 1

Status
Not open for further replies.

warren66

Technical User
Dec 9, 2003
10
GB
When I export a date from an Access table, I invariably get it formatted with the time (set at 00:00:00).

I can't see how I can suppress this. What I have to to is either edit the .csv file with notepad, using Search-and-Replace, or export it to Excel, and then save that file as a .csv.

Is there a way to configure this so it exports naturally, without the time.

Thanks in advance
 
This I believe has to do with the format of the date/time field that is being exported. Have you tried using a query with the date reformatted to mm/dd/yyyy to export your data to your file.

You can export a table or a query to an external file. Just use the Format function with the appropriate format indicated as a parameter.

If you need help doing this please post back with your table name and field names.

Bob Scriver
[blue]Want the best answers? See FAQ181-2886[/blue]


 
Thanks for your interest Bob.

I have set the format of the date field to "Short date", but when I export, it still puts the time in.

I don't mind starting from scratch if you can tell me how I should set the field up.

Thanks again

Warren
 
Messy, but I think it works. Do a query on your table with this on the date field Left([your date field],10) AS Newdate.

This will export the Newdate field as "dd/mm/yyyy
 
SuicidED's posting should work for you. If not we can also convert the 10 characters to a string and export the string representation of the short date.

Bob Scriver
[blue]Want the best answers? See FAQ181-2886[/blue]


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top