Sign in to follow this  
Followers 0
Elagizy

how many milliseconds in 1 second ?

15 posts in this topic

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

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

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

Share this post


Link to post
Share on other sites

Milli means 1000.

Share this post


Link to post
Share on other sites

'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
Milli means 1000.

586485123[/snapback]

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

Share this post


Link to post
Share on other sites
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

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
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

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
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
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
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

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.