Create an account on Neowin to contribute and support the site.

#### 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 on other sites
huddy    4

1,000 milliseconds makes up one second.

Edit : How is VB saying it's 96?

##### Share on other sites
rokin blenda    0

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

##### Share on other sites
Max    49

Milli means 1000.

##### 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 on other sites
SaLiVa    3
Milli means 1000.

586485123[/snapback]

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

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

markjensen    86

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

##### Share on other sites
Elagizy    0

586485226[/snapback]

OMG :woot: , GOOOOGLE ROCKS :rofl:

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