Converting Dates from YYMMDD to MMDDYYYY

U

Uni

Hi All;

I'm looking for a format function that will convert a date in the text
format of YYMMDD to text format of MMDDYYYY.

Any help would be GREATLY appreciated!

Thanks in advance!
 
G

Guest

Hi

Change the format of the date field in the table to mmddyyyy - you can set
the input mask to about the same if you want.

Hope this helps
 
R

RoyVidar

Uni said:
Hi All;

I'm looking for a format function that will convert a date in the
text
format of YYMMDD to text format of MMDDYYYY.

Any help would be GREATLY appreciated!

Thanks in advance!

If you store dates as text in Access, I think I'd recommend switching
to Date/Time, which is a datatype created for such.

But, to convert from one text to another, I think I'd work a bit with
string manipulation functions, and the DateSerial function. From the
top of my head

dim dt as string
dt = <yourdate>
msgbox dt, format(dateserial(cint(left$(dt, 2)), _
cint(mid$(dt, 3, 2)), cint(right$(dt, 2))), "mmddyyyy")
 

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