Problem in using the method Convert.ToDateTime(string) Please help me.

Nov 23 2006 3:27 AM
Hi All,

                I have a string s that is "10/29/2006". I want to convert this string to datetime format.

 used the method

                          DateTime dt=System.Convert.ToDateTime(s);



                                 But it is giving an error "string was not recognised as a valid datetime. Please help me out.

Answers (2)