extract part of a text value into a date

S

sherriross81

I have a field that is a date but it is stored as a string. I am not allowed
to change the field data type, but in my access report I would like to
display it in more of a readable date format. Right now it displays as
"yyyymmdd". Is there a way to format it so that it is mm/dd/yyyy?

Thanks in advance
 
L

louisjohnphillips

I have a field that is a date but it is stored as a string.  I am not allowed
to change the field data type, but in my access report I would like to
display it in more of a readable date format.  Right now it displays as
"yyyymmdd".  Is there a way to format it so that it is mm/dd/yyyy?

Thanks in advance

Does the CDate() function work like this?

SELECT Format( CDate( AnsiInternationalDate ) , "mm/dd/yyyy" )
from MyTable;

Wouldn't that do the trick?
 
K

KARL DEWEY

Substitute your field name in the formula below for [y] ---
Format(CVDate(Right(Left([y],6),2) & "/" & Right([y],2) & "/" &
Left([y],4)),"mm/dd/yyyy")
 

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