Skip to content

Instantly share code, notes, and snippets.

@fcojperez
Created September 28, 2015 09:42
Show Gist options
  • Save fcojperez/2ce6bb9b9543f9717547 to your computer and use it in GitHub Desktop.
Save fcojperez/2ce6bb9b9543f9717547 to your computer and use it in GitHub Desktop.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
/*
* 28/09/2015, Calculo de en milisegundos entre la fecha actual y 1970/01/01
* Francisco Pérez, [email protected]
*/
namespace CSharpDateDiff
{
class DateDiff
{
static void Main(string[] args)
{
long timestatmp = 1000 * (long) (DateTime.UtcNow - new DateTime(1970, 1, 1)).TotalSeconds;
Console.WriteLine(timestatmp);
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment