And, of course, there are also corresponding format strings for the minute ("mm") and the second ("ss"). Such a format string can also be used to obtain the complete time (without date) as three times two characters plus time separators by using the format string "HH:mm:ss".
Moreover, given this is the common way to write it in the current culture, this complete format is equivalent to the shorter (and culture-aware) long time format that is written as "T". Finally, as this format is used really frequently in programs, there's a DateTime method that returns a time formatted that way without the need to pass a format string at all: ToLongTimeString(). So, the straightest way to get to the complete formatted time, based on your code, would be:
DateTime GetDateTimeInfo = DateTime::Now;
return GetDateTimeInfo.ToLongTimeString(); // six digits, two separators
Originally Posted by Miraclezz
This is the solving solution!
Fine. In this situation it's good practice (though unfortunately rarely done) to mark the thread [RESOLVED] using the Thread Tools menu at the top of the thread display, as an aid to other users seeing the thread.
Last edited by Eri523; March 17th, 2012 at 03:52 PM.
I was thrown out of college for cheating on the metaphysics exam; I looked into the soul of the boy sitting next to me.
This is a snakeskin jacket! And for me it's a symbol of my individuality, and my belief... in personal freedom.