Link to home
Start Free TrialLog in
Avatar of Able22
Able22

asked on

format date

I have a date: 11/04/2006 and I want it to be formatted to MMYY, so it would = 1106, is there a formatting function that will do this?
Avatar of bobbit31
bobbit31
Flag of United States of America image

MsgBox Format(<yourDate>, "mmyy")
Avatar of Able22
Able22

ASKER

This is what I have in my code currently:


lexpire = Format(vexpire, "mmyy")   ' where vexpire = "10/31/2006"

lexpire gets set to 10/2/1902 , both vexpire and lexpire as Date field types

ASKER CERTIFIED SOLUTION
Avatar of Dang123
Dang123

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Able22

ASKER

you mean lexpire has to be defined as a string, not a date..  That worked..  Thanks...