1

In the JSON objects that is returned from the API I'm using, it returns the time in Unix-format with "time" as key:

time = 1434810953

Using the JSON.Net

JsonConvert.DeserializeObject

I want to automatically convert the unix-timestamp to a DateTime for my object

Public DateTime Time { get; set; }

How can I do this?

Jonatan Grim
  • 93
  • 1
  • 5
  • See https://stackoverflow.com/questions/19971494/how-to-deserialize-a-unix-timestamp-ms-to-a-datetime, only it looks like yours may be in seconds not ms, so see https://stackapps.com/questions/1175/how-to-convert-unix-timestamp-to-net-datetime – dbc Jun 20 '15 at 18:30

0 Answers0