Format Text as Date

  • Thread starter mattc66 via AccessMonster.com
  • Start date
M

mattc66 via AccessMonster.com

I have data from a legacy system. The date is yymmdd. I would like to format
(display) this in a query or form as mm/dd/yy.

The data comes as a text field when I import it into Access from ASCII.

Can anyone help me?

Thanks
Matt
 
C

Charles E. Vopicka

mid(yymmdd,3,2) & "/" & right(yymmdd,2) & "/" & left(yymmdd,2)


hope i got my syntax right but that will get you moving along hopefully.
if you ant a true date i just tried something the other day for a
similar problem.


cdate(mid(yymmdd,3,2) & "/" & right(yymmdd,2) & "/" & left(yymmdd,2))


that will return an actual date type of data otherwise it will be text
I have data from a legacy system. The date is yymmdd. I would like to format
(display) this in a query or form as mm/dd/yy.

The data comes as a text field when I import it into Access from ASCII.

Can anyone help me?

Thanks
Matt


--
Charles E. Vopicka's (Chuck) : (e-mail address removed)

Database Management, GIS Specialist and Research Assistant

Forest Biometrics Research Institute
University of Montana - College of Forestry and Conservation
Missoula, MT 59812
United States of America

Phone:
(406)243-4526
(406)243-4264
(406)549-0647 (Home)

:) HAVE A NICE DAY (-:

"UNLESS" (The Lorax, by Dr. Seuss)
 

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

Similar Threads

Convert Date Format 3
Date comparison 2
Date format 1
Converting Text to Date 8
Error: Data type mismatch in criteria expression 0
Filtering Criteria Question 2
Create Date Field from Text 2
CDATE Problem 3

Top