adamtrask
asked on
How to convert the text value of a textBox into date
Hi,
I have a textBox which contains in its text property a date. I need to place the date into a date variable: I tried without success the following:
Dim newDate As Date = CType(txtNewDate.Text, Date).ToShortDateString
Can you help?
thanks
I have a textBox which contains in its text property a date. I need to place the date into a date variable: I tried without success the following:
Dim newDate As Date = CType(txtNewDate.Text, Date).ToShortDateString
Can you help?
thanks
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thank you
Dim newDate As Date = DateTime.Parse(txtNewDate.
Then you can use newDate.ToShortDateString(
Or directly DateTime.Parse(txtNewDate.