Skip to content

Instantly share code, notes, and snippets.

@cubed2d
Created January 28, 2011 15:12
Show Gist options
  • Save cubed2d/800364 to your computer and use it in GitHub Desktop.
Save cubed2d/800364 to your computer and use it in GitHub Desktop.
System.Version MyVersion = System.Reflection.Assembly.GetExecutingAssembly().GetName().Version;
// MyVersion.Build = days after 2000-01-01
// MyVersion.Revision*2 = seconds after 0-hour (NEVER daylight saving time)
DateTime MyTime = new DateTime(2000, 1, 1).AddDays(MyVersion.Build).AddSeconds(MyVersion.Revision * 2);
return string.Format("Version:{0} Compiled:{1:s}", MyVersion, MyTime);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment