CSharp examples for System:DateTime Second
Get Epoch seconds
using System.Threading.Tasks; using System.Text; using System.Linq; using System.Collections.Generic; using System;// w ww . ja v a 2 s. c o m public class Main{ public static uint GetEpoch() { return (uint)(DateTime.Now - new DateTime(1970, 1, 1)).TotalSeconds; } }