String / DateTime Conversion problem (asp.net vb)
Posted
by Phil
on Stack Overflow
See other posts from Stack Overflow
or by Phil
Published on 2010-03-17T10:44:17Z
Indexed on
2010/03/17
10:51 UTC
Read the original article
Hit count: 174
I have this code:
Dim birthdaystring As String = MonthBirth.SelectedValue.ToString & "/" & DayBirth.SelectedValue.ToString & "/" & YearBirth.SelectedValue.ToString
Dim birthday As DateTime = Convert.ToDateTime(birthdaystring)
Which produces errors (String was not recognized as a valid DateTime.)
The string was "01/31/1963".
Any assistance would be appreciated.
Thanks.
© Stack Overflow or respective owner