FaithDan
asked on
Convert number yyyymmdd to Date/time mm/dd/yyyy MS Access 2003
Microsoft Access 2003
I have a table with a number field [Brth_DT] with dates setup as yyyymmdd. This field is setup with the data type Number.
I am making a make- table Query to convert this number field to a date field in the new table. I need the new field to be a date field with mm/dd/yyyy.
What expression do I need to use to get this to work in the Query Design View?
I have a table with a number field [Brth_DT] with dates setup as yyyymmdd. This field is setup with the data type Number.
I am making a make- table Query to convert this number field to a date field in the new table. I need the new field to be a date field with mm/dd/yyyy.
What expression do I need to use to get this to work in the Query Design View?
ASKER
I tried that it says invalid syntax or quotes. Any Ideas?
ASKER CERTIFIED SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
If u want it displayed as mm/dd/yyyy you could try changing the format property on the table design.
subsequently doing format("mydatefield","Shor t Date") will take the format that is defined in your control panel settings
but you can override by doing format("mydatefield","MM/D D/YYYY")
note, only to be done on a date field, not your yyyymmdd field
subsequently doing format("mydatefield","Shor
but you can override by doing format("mydatefield","MM/D
note, only to be done on a date field, not your yyyymmdd field
ASKER
Thanks Rockiroads... it worked perfeclty
No probs. Glad to have helped, again!!! :)
CInt(Left([Brth_DT], 2)), CInt(Mid([Brth_DT], 3, 2))), DateSerial(CInt(Right([Brt
Greg