There is a date in string format: "May 04, 2011". Need to convert to datetime. Convert.ToDateTime - does not plow.
I used to almost never write in C # and the question arises: what format of the date should be presented in the string for successful conversion (please, if it is not difficult to give an example as similar to mine as possible)? Or maybe the format presented by me is quite accepted and I am doing something wrong?
Thank you in advance!

    1 answer 1

    To convert data specific to different cultures, it is necessary to indicate the culture by the parameter of the method that you are using. As for the conversion of the string to the DateTime, the detailed information can be found in this MSDN article: Parsing Date and Time Strings .

    Hope will help to understand.