Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

format from yymmdd to yy/mm/dd in a table

Status
Not open for further replies.

tincan56

MIS
Feb 18, 2002
24
US
Hi, I hope anyone can help me with my issue.
I have a column in a table that has yymmdd in it as text,
however, access does not allow me to format from text to date if it does not have slashes between the yy, mm, and dd.

How can I go about to code something that would populate
slashes between the yy, mm, and dd?

Original data in a table
yymmdd (as text)
yymmdd
yymmdd
yymmdd...

Need to populate the data to in a table
yy/mm/dd
yy/mm/dd
yy/mm/dd
yy/mm/dd...

Thank you so much for your help!
 
SELECT left(dateField,2) + '/' + mid(datefield,3,2) + '/' + right(datefield,2) FROM myTable Get the Best Answers! faq333-2924
"A witty saying proves nothing." - Voltaire
mikewolf@tst-us.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top