Sign in to follow this  
Followers 0

how many milliseconds in 1 second ?

15 posts in this topic

Posted

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

Posted

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

Posted

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

Share this post


Link to post
Share on other sites

Posted

Milli means 1000.

Share this post


Link to post
Share on other sites

Posted

'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

Posted

[quote name='Max

Share this post


Link to post
Share on other sites

Posted

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

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

Posted

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

Posted

1,000 milliseconds makes up one second.

Edit : How is VB saying it's 96?


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

Posted

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

Posted

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

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

Share this post


Link to post
Share on other sites

Posted

[quote name='Max

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0

  • Recently Browsing   0 members

    No registered users viewing this page.