I get a json date from a webservice that i need to parse manualy and the date looks like this: "Fri, 06 Nov 2009 00:00:00 -0800"
How would i parse this into a datetime object?
I guess i should use DateTime.ParseExact but what do i feed into it.
I get a json date from a webservice that i need to parse manualy and the date looks like this: "Fri, 06 Nov 2009 00:00:00 -0800"
How would i parse this into a datetime object?
I guess i should use DateTime.ParseExact but what do i feed into it.
Just use DateTime.Parse. I verified it works for this string.
I ran this code and it worked fine:
string date = "Fri, 06 Nov 2009 00:00:00 -0800";
DateTime dt = DateTime.Parse(date);
// parse JSON formatted date to javascript date object
var date = new Date(parseInt(jsonDate.substr(6)));
// format display date (e.g. 04/10/2012)
THEN
var displayDate = $.datepicker.formatDate("mm/dd/yy", date);