Importing date fields that are stored as text in fixed width text file

D

David

Whenever I use the import wizard to upadte an existing
table I lose all the date field values. The fields values
are passed as terxt from a fixed width txt file and they
need to be stored on the databse as date fields.

Is there any easy way round fixing this problem ?

Thanks.
 
J

John Nurick

Hi David,

One way round this is to link to the textfile (or import it to a
temporary table) and then use an update or/and append query to transfer
the data to your "real" table. That way, you can use type conversion
functions in the query, e.g. if TextDate is a text field containing a
date, use
CDate([TextDate])
to convert it to an Access date value (watch out for complications if
there's a mixture of dd/mm and mm/dd dates).
 

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