C
Charles A. Lackman
Hello,
I an trying to get away from using a Date Time Picker and would like to know
how to make a textbox format to a date, i.e.
6604 would be converted to 06/06/04
and if the user type in
6/6/04 it would be converted to 06/06/04
I have experimented with formating the information with little to no success
ie.
textbox1.text = format(textbox2.text, "0#/0#/0#")
or even
Dim ADate as Date
ADate = CType(TextBox2.text, Date)
Format(ADate, "mm/dd/yy")
Textbox1.text = ADate
Anyway, I have tried alot of different ways to make it work with no success.
Any suggestions and examples will be greatly appreciated.
Chuck
P.S. I have wondered if an input mask would solve this problem, but I an not
sure how to accomplish this.
I an trying to get away from using a Date Time Picker and would like to know
how to make a textbox format to a date, i.e.
6604 would be converted to 06/06/04
and if the user type in
6/6/04 it would be converted to 06/06/04
I have experimented with formating the information with little to no success
ie.
textbox1.text = format(textbox2.text, "0#/0#/0#")
or even
Dim ADate as Date
ADate = CType(TextBox2.text, Date)
Format(ADate, "mm/dd/yy")
Textbox1.text = ADate
Anyway, I have tried alot of different ways to make it work with no success.
Any suggestions and examples will be greatly appreciated.
Chuck
P.S. I have wondered if an input mask would solve this problem, but I an not
sure how to accomplish this.