Importing a timestamp

G

Guest

I was importing a text file with a timestamp into a new table using the
import wizard. I have set the advanced to be the correct date format. But I
can not get the timestamp to import. The timestamp has the following format.

yyyy-mm-dd hh:nn:ss.sssssssss

I do not know how to set the format for a field during the import. Guess I
could import to an existing table, but I do not know the format pattern for
the above timestamp in the designer.

Another question. During the import wizard, how can you set the length of
the text fields during import.

Thanks
 
D

Douglas J. Steele

Access won't work with the decimal second part: it's only designed to hold
yyyy-mm-dd hh:nn:ss.

Try importing it as text, then write an Update query to remove everything
after the decimal point. Once you've done that, you can add a Date/Time
field to the table and write another Update query to populate the Date/Time
field with the value of the Text date field (using the CDate function)
 

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