.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Home >> Code Snippets >> DateTime >> Post New Resource Bookmark and Share   

 Subscribe to Code Snippets

Convert/Format Unix Timestamp to DateTime

Posted By:Pankaj Mishra       Posted Date: August 14, 2008    Points: 10    Category: DateTime    URL: http://www.dotnetspark.com  


Below is the method to convert Unix Timestamp to .Net DateTime Format using C#.

public static DateTime FormatUnixTime(double timestamp)

DateTime startUnixTime = new DateTime(1970, 1, 1, 0, 0, 0, 0);

return startUnixTime.AddSeconds(timestamp);




Further Readings:


No response found. Be the first to respond this post

Post Comment

You must Sign In To post reply
Find More code samples in C#, ASP.Net, Vb.Net and more Here

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend