Archived

This topic is now archived and is closed to further replies.

how many milliseconds in 1 second ?

Recommended Posts

Elagizy    0

hello,

I need to know 1 second = ?? milliseconds

when i use Format(Now, "ff") it seems that the maximum value is 96.

I think 1 secound = 100 milliseconds but vb.net says 96 :pinch:

Is "ff" refer to millisecond or what ?!

Thanks for any help

Share this post


Link to post
Share on other sites
huddy    4

1,000 milliseconds makes up one second.

Edit : How is VB saying it's 96?

Share this post


Link to post
Share on other sites
rokin blenda    0

the milli prefix means 10^-3, so 1 second = 1000 milliseconds

Share this post


Link to post
Share on other sites
Max    49

Milli means 1000.

Share this post


Link to post
Share on other sites
Antaris    77

'f' when used in a style string for the Format(...) function referes to fixed numerical value, not a milli second, you want to pull that value out yourself (from the time), and calulate the milli seconds manually.

Share this post


Link to post
Share on other sites
SaLiVa    3
Milli means 1000.

586485123[/snapback]

Wrong. 10^-3 (To the power of -3)

Share this post


Link to post
Share on other sites
Max    49
Wrong. 10^-3 (To the power of -3)

586485126[/snapback]

http://en.wikipedia.org/wiki/SI_prefix

Look at the table. Yes, it is 10^-3, but Milli indicates 'Thou'.

10−3  milli  m  Thousandth  0.001

Share this post


Link to post
Share on other sites
+mrbester    115

Take a closer look yourself. "Milli" means thousandth (with "kilo" meaning thousand). The "Thou" part is irrelevant in this case as it isn't a root element of the words in question...

Share this post


Link to post
Share on other sites
Elagizy    0
1,000 milliseconds makes up one second.

Edit : How is VB saying it's 96?

586485101[/snapback]

1:      Enc1.Text = Format(Now, "ff")
        If Enc1.Text = 96 Then Exit Sub Else GoTo 1

The maximum value which i reached to exit sub is 96

if "ff" is not a millisecond, so what is it ?

Share this post


Link to post
Share on other sites
+BudMan    2,921

http://msdn.microsoft.com/library/default....dateformats.asp

F Displays fractions of seconds. For example ff will display hundredths of seconds, whereas ffff will display ten-thousandths of seconds. You may use up to seven f symbols in your user-defined format. Use %f if this is the only character in your user-defined numeric format.

Share this post


Link to post
Share on other sites
Elagizy    0
http://msdn.microsoft.com/library/default....dateformats.asp

F? Displays fractions of seconds. For exampleff> will display hundredths of seconds, whereas ffff will display ten-thousandths of seconds. You may use up to seven f symbols in your user-defined format. Use %f if this is the only character in your user-defined numeric format.

586485217[/snapback]

WOW, Thanks alot for this link(Y)), it really helps.

Thanks all for your help:))

Share this post


Link to post
Share on other sites
+BudMan    2,921
WOW, Thanks alot for this link (Y), it really helps.

586485225[/snapback]

Yeah, crazy huh --> who would think to look in the documentation for info :rolleyes:

Share this post


Link to post
Share on other sites
SaLiVa    3
http://en.wikipedia.org/wiki/SI_prefix

Look at the table. Yes, it is 10^-3, but Milli indicates 'Thou'.

586485163[/snapback]

One thousandth of a metre. Yes, you just proved it yourself.

I take Physics and we have to deal with these conversions everyday. It defines whether you get a mark or not in any question, and every mark counts...

Share this post


Link to post
Share on other sites

  • Recently Browsing   0 members

    No registered users viewing this page.