How do you get the current time of day?

DateTime.Now.TimeOfDay gives it to you as a TimeSpan (from midnight).

DateTime.Now.ToString("h:mm:ss tt") gives it to you as a string.

DateTime reference: https://msdn.microsoft.com/en-us/library/system.datetime

Leave a Comment