Importing Date Problem

G

Guest

I'm importing data from a text file and the date is shown as 040207. I've
set my table I'm importing to "short date" format. When I do that, the date
does not import. Is there some other way I can convert the date to be the
short date format 4/2/2007 in my reports if it is shown in my table at
040207? Thanks in advance for your help.
 
J

John W. Vinson

I'm importing data from a text file and the date is shown as 040207. I've
set my table I'm importing to "short date" format. When I do that, the date
does not import. Is there some other way I can convert the date to be the
short date format 4/2/2007 in my reports if it is shown in my table at
040207? Thanks in advance for your help.

I'd suggest *linking* to the text file (rather than importing); run an Append
query to append it into the target table. Use a calculated field

CDate(Format([textdate], "@@/@@/@@"))

to convert the text string to a Date/Time field.

John W. Vinson [MVP]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top