Last active
December 28, 2017 07:16
-
-
Save aybarsyalcin/33312c9839b1aa39db3469493b18b1ac to your computer and use it in GitHub Desktop.
Convert Timestamp to Datetime with Format
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
long unixDate = (long)item.createdDate; | |
DateTime start = new DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc); | |
DateTime date = start.AddMilliseconds(unixDate).ToLocalTime(); | |
var dateString = date.ToString("dd/MM/yyyy"); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment