May 2007 Archives

You can do this in several different ways, I have seen some use the TimeSpan class but this served me fine:

DateTime baseTime = new DateTime(1970, 1, 1, 0, 0, 0);
DateTime nowInUTC = DateTime.UtcNow;
Console.WriteLine((nowInUTC - baseTime).Ticks / 10000);

I use this when appending timestamps to files.

About this Archive

This page is an archive of entries from May 2007 listed from newest to oldest.

April 2007 is the previous archive.

July 2007 is the next archive.

Find recent content on the main index or look in the archives to find all content.