c# 4.0 - How to Convert unix Timestamp in nanoseconds to DateTime in C# -


i have c# wpf user interface , c end. i'm receiving unix timestamp in nanoseconds end. there way convert nanoseconds human readable format?

try

public static datetime unixtimestamptodatetime( double unixtimestamp ) {     // unix timestamp seconds past epoch     system.datetime dtdatetime = new datetime(1970,1,1,0,0,0,0,system.datetimekind.utc);     dtdatetime = dtdatetime.addseconds( unixtimestamp ).tolocaltime();     return dtdatetime; } 

read post


Comments

Popular posts from this blog

php - failed to open stream: HTTP request failed! HTTP/1.0 400 Bad Request -

java - How to filter a backspace keyboard input -

java - Show Soft Keyboard when EditText Appears -