PC Review


Reply
Thread Tools Rate Thread

VBA Export with date/time stamp

 
 
Andy
Guest
Posts: n/a
 
      14th Sep 2009
How can I use the 'DoCmd.TransferText acExportDelim' function to export a
table name with a date/time stamp. The table name does not have the date/time
stamp on it.

Thanks
 
Reply With Quote
 
 
 
 
Douglas J. Steele
Guest
Posts: n/a
 
      14th Sep 2009
DoCmd.TransferText acExportDelim, , "MyTable", "C:\Folder\MyTable_" & _
Format(Date, "yyyymmdd") & ".csv", True

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)


"Andy" <(E-Mail Removed)> wrote in message
news:1C23A0E7-D8D4-4C93-BFFD-(E-Mail Removed)...
> How can I use the 'DoCmd.TransferText acExportDelim' function to export a
> table name with a date/time stamp. The table name does not have the
> date/time
> stamp on it.
>
> Thanks



 
Reply With Quote
 
kc-mass
Guest
Posts: n/a
 
      14th Sep 2009
Don't use the table directly. Instead form a query that selects all the
table fields and then add an
expression as "DateTime: Now()". Your exported data will then have the
current date/time.

Regards

Kevin


"Andy" <(E-Mail Removed)> wrote in message
news:1C23A0E7-D8D4-4C93-BFFD-(E-Mail Removed)...
> How can I use the 'DoCmd.TransferText acExportDelim' function to export a
> table name with a date/time stamp. The table name does not have the
> date/time
> stamp on it.
>
> Thanks



 
Reply With Quote
 
kc-mass
Guest
Posts: n/a
 
      14th Sep 2009
Maybe I misunderstood. Do you just want the date/time in the name of the
CSV file??

"Andy" <(E-Mail Removed)> wrote in message
news:1C23A0E7-D8D4-4C93-BFFD-(E-Mail Removed)...
> How can I use the 'DoCmd.TransferText acExportDelim' function to export a
> table name with a date/time stamp. The table name does not have the
> date/time
> stamp on it.
>
> Thanks



 
Reply With Quote
 
Andy
Guest
Posts: n/a
 
      14th Sep 2009
Yes, so I have a table 'x' and I want to output it to a location and name the
file x 2009-09-14 15:12.csv with the date/time as the export date/time.

"kc-mass" wrote:

> Maybe I misunderstood. Do you just want the date/time in the name of the
> CSV file??
>
> "Andy" <(E-Mail Removed)> wrote in message
> news:1C23A0E7-D8D4-4C93-BFFD-(E-Mail Removed)...
> > How can I use the 'DoCmd.TransferText acExportDelim' function to export a
> > table name with a date/time stamp. The table name does not have the
> > date/time
> > stamp on it.
> >
> > Thanks

>
>
>

 
Reply With Quote
 
kc-mass
Guest
Posts: n/a
 
      14th Sep 2009
See Doug Steeles reply - that will give it to you


"Andy" <(E-Mail Removed)> wrote in message
news:520BBA5A-24EE-4769-BD65-(E-Mail Removed)...
> Yes, so I have a table 'x' and I want to output it to a location and name
> the
> file x 2009-09-14 15:12.csv with the date/time as the export date/time.
>
> "kc-mass" wrote:
>
>> Maybe I misunderstood. Do you just want the date/time in the name of the
>> CSV file??
>>
>> "Andy" <(E-Mail Removed)> wrote in message
>> news:1C23A0E7-D8D4-4C93-BFFD-(E-Mail Removed)...
>> > How can I use the 'DoCmd.TransferText acExportDelim' function to export
>> > a
>> > table name with a date/time stamp. The table name does not have the
>> > date/time
>> > stamp on it.
>> >
>> > Thanks

>>
>>
>>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Comparing 2 files on date/time stamp, and based time difference do a subroutine info@stevik.nl Microsoft Excel Programming 1 28th Sep 2007 04:53 AM
full date time stamp of a group of messages won't export =?Utf-8?B?Q2hhcmxlcw==?= Microsoft Outlook Discussion 0 1st Mar 2007 09:58 PM
Export to be named using current date time stamp =?Utf-8?B?R2xlbmRh?= Microsoft Access 2 27th Jun 2005 06:04 PM
Saving codes source file date-time stamp for run-time use =?Utf-8?B?a2VuQG5vc3BhbS5ub3NwYW0=?= Microsoft Dot NET Framework 4 24th Jan 2005 06:32 PM
Invalid date time stamp error every time winxp pro boots Harp Windows XP Setup 2 18th Jul 2004 08:01 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 10:00 PM.