89
rated 0 times
[
94]
[
5]
/ answers: 1 / hits: 20068
/ 12 Years ago, tue, may 22, 2012, 12:00:00
I getting a Date value from JavaScript to a controller in MVC and I would like to parse it to .NET format DateTime but its giving me an error such as:
The string was not recognized as a valid DateTime.
The Format of the JavaScript date is:
Wed May 23 2012 01:40:00 GMT+0200 (W. Europe Daylight Time)
I've tried this but its not working:
DateTime.ParseExact(begin.Substring(1, 24), ddd MMM d yyyy HH:mm:ss, CultureInfo.InvariantCulture);
anyone can give me a sample code please? thanks!
More From » .net