Choose Category
using System; namespace forgetCode { class Program { static void Main(string[] args) { DateTime dt = DateTime.Now; string Timeonly = dt.ToShortTimeString(); //Only hour and minute Console.WriteLine(Timeonly); } } }