Class MainClass
Public Shared Sub Main()
Dim centuryBegin As Date = #1/1/2001 0:0:0#
Dim currentDate As Date = Date.Now
Dim elapsedTicks As Long = currentDate.Ticks - centuryBegin.Ticks
Dim elapsedSpan As New TimeSpan(elapsedTicks)
Console.WriteLine("Elapsed from the beginning of the century to {0:f}:",currentDate)
Console.WriteLine(" {0:N0} nanoseconds", elapsedTicks * 100)
Console.WriteLine(" {0:N0} ticks", elapsedTicks)
Console.WriteLine(" {0:N2} seconds", elapsedSpan.TotalSeconds)
Console.WriteLine(" {0:N2} minutes", elapsedSpan.TotalMinutes)
Console.WriteLine(" {0:N0} days, {1} hours, {2} minutes, {3} seconds",elapsedSpan.Days, elapsedSpan.Hours,elapsedSpan.Minutes, elapsedSpan.Seconds)
End Sub
End Class