How would I be able to get the time of day from my computer and make it a string? Thanks. This is what I thought the code would look like but apparently its not that simple.

string timeOfDay = DateTime.Today.TimeOfDay.ToString();
DateTime.Now.ToString();

// want hours, minutes, seconds only?
DateTime.Now.ToString("HH:mm:ss");
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.