I am getting requests from API for my app. In that the date/time is claimed to be in the format of Long. I am trying to convert it using the following lines.
DateTime? dt = new DateTime(long.Parse(detail.CREATEDTIME));
MessageBox.Show(detail.CREATEDTIME + "=>" + dt.Value.ToString("yyyy-MM-dd"));
The actual output is as follows:
1393559958788=>0001-01-02
But the expected output is as follows:
1393559958788=>2014-02-28
The expected output is from java. How do i do this with C#
?