formatting millisecond RRS feed

  • Question

  • hi,

    I'm trying to format milliseconds. how to get the first digit alone .

    Actuall y i'm calculating timespan and formating it by ,

    String.Format("{0:d1}.{1:d1}", ck2.Seconds, ck2.Milliseconds)

    millisecond is represented by 3 digits. i want to show it as one digit representation.

    Example: if 256 ms means, i need to show only 2.

    how to do it? I'm using VS2003.

    Thank You!

    Friday, April 28, 2006 7:28 AM