convert json date to datetime c#

StackOverflow Post but it doesnt work.
Now that I can deserialize it, I'll work on getting the deadman wonderland episode 9 sub indo dates into a valid format so I can create domain objects from my DTOs.That exception happens when I call Deserialize (third line in method below public ActionResult Save(string jsonData) var serializer new JavaScriptSerializer gisterConverters(new new TimeSpanJsonConverter var specs return View Index _allTrackerJobs I've been doing some googling, and the above code is my latest attempt to make this.Other approaches show sending only a date to the server, but I have a list of objects that have dates as some properties.See my answer below (not the crappy work-around in this question).I have a javascript function that calls an MVC controller with json data: var specsAsJson ringify(specs.post Home/Save jsonData: specsAsJson On the server side, within the controller, I can't seem to get past this error: /Date( is not a valid value for DateTime.
Edit - Crappy work-around, i created a DTO with the exact same fields as the domain object, except that I made the date fields strings so they would deserialize.
I have been trying add extra"s like the asnwer in this.




Since your string has an offset part, I would parse.DateTimeOffset instead of Datetime.Utc Double startMilliseconds bstring(6, 13 Double endMilliseconds bstring(6, 13 DateTime startTime LocalTime DateTime endTime LocalTime EquipmentSpec spec new EquipmentSpec(startTime, endTime, specDto.Public class EquipmentSpecDto public string StartTime get; set; public string EndTime get; set; / more properties here.UtcDateTime; var nytz ndSystemTimeZoneById US Eastern Standard Time var ny_time nvertTimeFromUtc(utc, nytz Console.What's the right way to resolve this?Searching for sample, I got following: string s Date( DateTimeOffset dto DateTime utc dto.Currently Daylight Saving Time is in effect.DateTime dotNetDate new DateTime(1970, 1, 1 dotNetDate Int64( ) i use too T as bellow string sa Date( dateTime dt new DateTime dt but it doesnt work too, so the question.DateTime unixEpoch new DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.