Convert number to date

  • Thread starter Thread starter SAC
  • Start date Start date
S

SAC

I have a number field in a table that is imported from a differt system. It
stand for a date and is in the format of 20051018.

I would like to use on update query to update this to a date field.

How would I go about this?

Thanks.
 
Use this expression in your update query:
DateSerial(Left([dt],4), Mid([dt],5,2), Right([dt],2))

Replace dt with your field name.
 

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

Back
Top