Format as date MS Access

Can someone please provide me with the code for me to put it in a Microsoft access query to format a date?

the current format is as follow: 06132003

I like to format it as 06/13/2003 but the data is stored in the text field with the above format.

I like to change it with a query and make a new table with the new date format..

I just need the code to be able to that...
TonyEFAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
Helen FeddemaConnect With a Mentor Commented:
Is it a Date field or a Text field?  If it is Text, you can convert it to a date using the CDate function and some String functions:

CDate(Left([TextDate],2) & "/" & Mid([TextDate],3,2) & "/" & Right([TextDate],4))

Save the Date value to a Date field, and set its format as desired in the Format field.
0
 
IrogSintaConnect With a Mentor Commented:
This should work too:
CDate(Format([TextDate]","##/##/####")
0
 
Gustav BrockConnect With a Mentor CIOCommented:
Or - without typos:

RealDate: CDate(Format([YourTextDate],"@@/@@/@@@@"))

/gustav
0
Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

 
IrogSintaCommented:
Correction:
CDate(Format([TextDate],"##/##/####")
Thanks for pointing that out, gustav
0
 
TonyEFAuthor Commented:
thank you all...
0
 
Gustav BrockCIOCommented:
You are welcome!

/gustav
0
All Courses

From novice to tech pro — start learning today.