By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,481 Members | 3,170 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,481 IT Pros & Developers. It's quick & easy.

Format String: Hundredth of a second

P: n/a
How can I display the hundredth of a second or which is the correct format
string?

I use now {0:yyyy-MM-dd HH:mm:ss} and this display the following
information:

2004-08-04 21:49:21... But I want to display the hundredth of a second
too...

Regards,

Özgür Aytekin (MCSD .NET, MCDBA)

www.borsagame.com


Nov 16 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
Make your format string {0:yyyy-MM-dd HH:mm:ss.ff}

Tom Dacon
Dacon Software Consulting

"Özgür Aytekin" <oe******************@spam.dotnetcracks.com> wrote in
message news:uW**************@TK2MSFTNGP11.phx.gbl...
How can I display the hundredth of a second or which is the correct format
string?

I use now {0:yyyy-MM-dd HH:mm:ss} and this display the following
information:

2004-08-04 21:49:21... But I want to display the hundredth of a second
too...

Regards,

Özgür Aytekin (MCSD .NET, MCDBA)

www.borsagame.com

Nov 16 '05 #2

P: n/a
Özgür Aytekin <oe******************@spam.dotnetcracks.com> wrote:
How can I display the hundredth of a second or which is the correct format
string?

I use now {0:yyyy-MM-dd HH:mm:ss} and this display the following
information:

2004-08-04 21:49:21... But I want to display the hundredth of a second
too...


Use

{0:yyyy-MM-dd HH:mm:ss.fff}

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
Nov 16 '05 #3

P: n/a
Jon Skeet [C# MVP] <sk***@pobox.com> wrote:
Özgür Aytekin <oe******************@spam.dotnetcracks.com> wrote:
How can I display the hundredth of a second or which is the correct format
string?

I use now {0:yyyy-MM-dd HH:mm:ss} and this display the following
information:

2004-08-04 21:49:21... But I want to display the hundredth of a second
too...


Use

{0:yyyy-MM-dd HH:mm:ss.fff}


Oops - one too many fffs - the above will give you thousandths of a
second.

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
Nov 16 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.