Get Epoch Time From DateTime

Niladri.Biswas
Posted by Niladri.Biswas under C# category on | Points: 40 | Views : 702
public static long GetEpochTimeFromDateTime(DateTime inputDateTime)
{
TimeSpan timeSpan = (inputDateTime - EpochDateTime);
return (long)timeSpan.TotalSeconds;
}

Comments or Responses

Login to post response