I am having a problem. How do I show the text of my Date correctly?
using DateTime.Now I was able to recieve the date & time the computers clock is set to currently, however, when I try to parse into a string format, it also shows the date like: 12-04-2012 12:38 but I was trying to get the time string only, like 12:38 only?
What I tried so far was Console.WriteLine(DateTime.Now.ToString("00:00:00"));
But it did not work =/
DateTimehas aToShortTimeStringmethod defined:Or, you can use a custom format string:
Alternatively, use the standard format string for short time format: