Re: printing time in log messages
- From: zacks@xxxxxxxxxxxxxxxxxxxxxxxx
- Date: Tue, 14 Oct 2008 11:42:49 -0700 (PDT)
On Oct 14, 2:03 pm, puzzlecracker <ironsel2...@xxxxxxxxx> wrote:
On Oct 14, 1:56 pm, za...@xxxxxxxxxxxxxxxxxxxxxxxx wrote:
On Oct 14, 1:51 pm, puzzlecracker <ironsel2...@xxxxxxxxx> wrote:
I have this string string time =
System.DateTime.Now.ToLongTimeString(); it is equal to 1:00:22 PM
I need it to be 13:00:22
Any suggestions how to format it?
Thanks
string.Format("{0:HH}:{1:mm}:{2:ss}", Now, Now, Now)
This is just one of many ways it can be done.
Argh, I don't think sting has Format member function :(
Yes, it does. I use it all the time.
.
- Follow-Ups:
- Re: printing time in log messages
- From: puzzlecracker
- Re: printing time in log messages
- Prev by Date: Re: Display a word document in a Windows program without Word
- Next by Date: Re: Process.BeginErrorReadLine and BeginOutputReadLine; buffer not flushed?
- Previous by thread: Re: printing time in log messages
- Next by thread: Re: printing time in log messages
- Index(es):