Problem with recorded dates.

  • Thread starter Thread starter hotplate
  • Start date Start date
H

hotplate

I have a table that was extracted from an ERP. The date was recorded
in this table with a 1 in front of the date because they were unable
to record values starting with 0.

For example: 1080515 would be May 15, 2008.

How could I write a query that would strip the one from that number
and convert the rest of the number to a date?
 
Use Mid() to parse the 3 components of the date, and DateSerial() to convert
them into a date.

The expression to type into the Field row in query design would be something
like this:
DateSerial(Mid([d],2,2), Mid([d],4,2), Right([d],2)
where d represents your field name.
 
Back
Top