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 derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Exporting dates to CSV without time 1

Status
Not open for further replies.

MasterRacker

New member
Oct 13, 1999
3,343
US
I'm using Access 2003 to do some intermediate data manipulation on information I am transferring from a FoxPro based app to a SQL server based app. The new app has predefined routines for importing CSV files. Those routines, however want dates formatted as "mm/dd/yyyy". Access wants to export dates as "mm/dd/yyyy 00:00:00".

Is there any way to suppress the time in a CSV export?

The only solution I have at the moment is to export to XLS then use Excel to export to CSV. This is an annoying waste of effort especially as I ahve some datasets that are over 65K rows and too large for Excel without being broken up.

_____
Jeff
[small][purple]It's never too early to begin preparing for [/purple]International Talk Like a Pirate Day
"The software I buy sucks, The software I write sucks. It's time to give up and have a beer..." - Me[/small]
 
in your query, rather than the date field, try this

Code:
format(MyDateField, "mmddyyyy")
(or whatever otehr date format you prefer.

Hope this helps,

Alex

Ignorance of certain subjects is a great part of wisdom
 
I was trying to export tables. Exporting the query with the mod you suggest does seem to work. It's a pain to have to specify that on every date field but it's better than the alternative. Thanks.

_____
Jeff
[small][purple]It's never too early to begin preparing for [/purple]International Talk Like a Pirate Day
"The software I buy sucks, The software I write sucks. It's time to give up and have a beer..." - Me[/small]
 
Yeah, I run into problems with that all the time. It's a pain, but what can you do? I think it beats storing dates as strings, and the performance issues that would cause.

PS - your signature is brilliant!

Alex

Ignorance of certain subjects is a great part of wisdom
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top