date conversion

D

Dave Waling

I am linking to an AS/400 database and the dates are
displayed in Access as text fields in the yyymmdd
format. Since they are in text format I can't do date
quries.

How can I convert the text into a date field Access can
use for queries?

Thanks four your help and suggestons.
Dave
 
K

Ken Snell [MVP]

see replies in other newsgroup (queries?) where you posted this question. at
least, i think it was you...question was essentially the same :)
 
D

Douglas J. Steele

Assuming the date is stored in a field named TextDate, the following will
convert it to a date:

DateSerial(Left([TextDate], 4), Mid([TextDate], 5, 2), Right([TextDate], 2))
 

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