CSharp examples for System:DateTime Unix
Get Unix Timestamp
using System;//w w w.ja v a 2 s . c om public class Main{ public static string GetUnixTimestamp() { TimeSpan t = (DateTime.UtcNow - new DateTime(1970, 1, 1)); return ((int)t.TotalSeconds).ToString(); } }