andw928
asked on
System.InvalidCastException: Cast from string "11/18/2003" to type 'Date' is not valid.
Why can't I format this: CDate("11/18/2003") in asp.net
Do I have a culture set up somewhere different then un-us?
Do I have a culture set up somewhere different then un-us?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ALWAYS use dates in the UNambigous format yyyy-mm-dd which is the ODBC format.
No comment has been added lately, so it's time to clean up this TA.
I will leave the following recommendation for this question in the Cleanup topic area:
Accept: the-edge {http:#9814417}
Please leave any comments here within the next seven days.
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!
TheLearnedOne
EE Cleanup Volunteer
I will leave the following recommendation for this question in the Cleanup topic area:
Accept: the-edge {http:#9814417}
Please leave any comments here within the next seven days.
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!
TheLearnedOne
EE Cleanup Volunteer
stringvalue = CDate("11/18/2003"), where stringvalue is a string variable, then you will get the error.