There are lots of examples of how to parse a "json date" in C# using .net4+, But I havent found many which will work on .Net 2.0.
Like this one Parsing JSON DateTime from Newtonsoft's JSON Serializer which works great if you have .net4 and can use libraries..
I however only have base .Net 2 at my disposal.
So, what is the best way to parse this:
"/Date(1427565325073+0100)/"
To a C# System.DateTime
.
My code current code does not work with timezones.
private System.DateTime ParseJsonDate(string jsondate)
{
jsondate = jsondate.Replace("/Date(", "");
jsondate = jsondate.Replace(")/", string.Empty);
var expDate = new System.DateTime(long.Parse(jsondate));
return expDate;
}