Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Importing / Linking / September 2007

Tip: Looking for answers? Try searching our database.

Export date without time and without "" quotes around date.

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Lisa - 26 Sep 2007 20:10 GMT
Hi.

I need to export a date field to .csv format without the time and without
the "" quotes around the date.

I've tried FormatDateTime and Format and I get a set of "" quotes around the
date and I can't have that.

I've tried CDate and I get the time.

Please help
Thanks
Lisa
Jerry Whittle - 27 Sep 2007 16:41 GMT
Close but no cigar! I created a query that has a date/time field holding
time. In the query I put the following.
FormatDate: Format([DateAndTime],"mm/dd/yyyy")

As you already know, exporting the above will put "" around the date. Here's
the trick:
Start exporting the query manually.
When the Export Text Wizard dialog box appears, you'll see an Advanced
button towards the lower left. Click on it.
Go to the field in question.
Up near the top you'll see the Text Qualified dropdown. Set it to {none}.
Next click on the Save As button and save the export spec. Remember the name.
Then click on the OK button and finish the export with options such a Comma
and field names as necessary.
See it the export looks right.

The reason to save the export spec is this: If you are going to do this same
task over and over, you can automate the process either in a function or
macro.

In a macro use the TransferText and there is a place for the export
specification name.

In a function or module, the TransferText Action has a place for the export
spec argument. It would look something like this:

DoCmd.TransferText acExportDelim, "Standard Output", _
   "External Report", "C:\Txtfiles\April.doc"

Signature

Jerry Whittle, Microsoft Access MVP
Light. Strong. Cheap. Pick two. Keith Bontrager - Bicycle Builder.

> Hi.
>
[quoted text clipped - 9 lines]
> Thanks
> Lisa
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.