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

Import text file with alternate date formats

Status
Not open for further replies.

LynneAOG

MIS
Jun 23, 2004
4
US
I need to import a text file with dates that are formatted as "dd-mmm-yy". If I use the Wizard, I have to go through the Advanced options to tell Access how the dates are formatted. Is there any way to bypass the Wizard and import to Access with the date specifications and a "|" as a delimiter? Thanks
 
You could import the text file without the defined import specification (all fields will likely default to text or number data types) and then use an append query to both format (using the Format() and CVDate()/CDate() functions; see help file for these) and append the records to your table as you want them to appear.

Cheers,
BD42
 
When you specify the import specifications with the wizard inside the Advanced options, simply save the schema.
Then in code you can bypass the wizard with the DoCmd.TransferText method.

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top