Date Conversions

A

Adam

I am importing a raw data file, fixed width. There is a
date field in the text file that looks like:

031014

YYMMDD is the format.

When I put Date/Time format in the Access table it errors
out due to conversion type failure. How can I make Access
understand this?

Thanks
 
B

Bruce M. Thompson

I am importing a raw data file, fixed width. There is a
date field in the text file that looks like:

031014

YYMMDD is the format.

When I put Date/Time format in the Access table it errors
out due to conversion type failure. How can I make Access
understand this?

Use the DateSerial() function:

DateSerial(left([DateValue],2),mid([DateValue],3,2),right([DateValue],2))

"DateValue" would be the name of the field that you are converting.
 

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