How to change yyyymmdd number field to a date field

  • Thread starter Thread starter mcin7535
  • Start date Start date
M

mcin7535

How can I format a number field in a table that has the data formated
like yyyymmdd into a date field using a query?
 
hi,
How can I format a number field in a table that has the data formated
like yyyymmdd into a date field using a query?
You can't format it. But you can build it:

DateSerial(Mid([Field], 1, 4), Mid([Field], 5, 2), Mid([Field], 7,2))



mfG
--> stefan <--
 
Stefan Hoffmann said:
hi,
How can I format a number field in a table that has the data formated
like yyyymmdd into a date field using a query?
You can't format it. But you can build it:

DateSerial(Mid([Field], 1, 4), Mid([Field], 5, 2), Mid([Field], 7,2))

Or CDate(Format([Field1], "####\-##\-##"))
 
How can I format a number field in a table that has the data formated
like yyyymmdd into a date field using a query?

Ok, the build option worked! Thanks for the help!
 
Back
Top