Reply to this topic Topic Options
how many milliseconds in 1 second ?, VB.Net is confusing me
Elagizy
Post #1 Sep 6 2005, 11:44


Resident Elite
Group Icon

Group: Registered
Posts: 1,123
Joined: 6-June 04
From: Egypt
Member No.: 58,074
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.gif

Is "ff" refer to millisecond or what ?!

Thanks for any help


Profile Card PM + Reply to Post Go to the top of the page Email Poster

Log In or Register · Advertise on Neowin
huddy
Post #2 Sep 6 2005, 11:46


Xbox Gamer Tag: Huddy72
Group Icon

Group: Registered
Posts: 387
Joined: 2-September 04
From: London
Member No.: 69,809
1,000 milliseconds makes up one second.

Edit : How is VB saying it's 96?
Profile Card PM + Reply to Post Go to the top of the page Email Poster
rokin blenda™
Post #3 Sep 6 2005, 11:48


Neowinian
Group Icon

Group: Registered
Posts: 14
Joined: 9-May 05
From: London/Oxford
Member No.: 109,573
the milli prefix means 10^-3, so 1 second = 1000 milliseconds
Profile Card PM + Reply to Post Go to the top of the page Email Poster
Max™
Post #4 Sep 6 2005, 11:55


Neowin Rocker
Group Icon
Group Icon

Group: Moderator
Posts: 10,974
Joined: 21-April 03
From: Boscastle, Cornwall
Member No.: 26,671
Milli means 1000.
Profile Card PM + Reply to Post Go to the top of the page Email Poster
Antaris
Post #5 Sep 6 2005, 11:56


Neowinian Wise One
Group Icon
Group Icon

Group: Moderator
Posts: 4,446
Joined: 25-January 05
From: United Kingdom
Member No.: 92,970
'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.
Profile Card PM + Reply to Post Go to the top of the page Email Poster
SaLiVa
Post #6 Sep 6 2005, 11:57


The Only Bruneian Here
Group Icon

Group: Registered
Posts: 2,136
Joined: 3-July 03
From: Southampton, Hampshire
Member No.: 32,056
QUOTE(Max™ @ Sep 6 2005, 19:55)
Milli means 1000.
[right][snapback]586485123[/snapback][/right]

Wrong. 10^-3 (To the power of -3)
Profile Card PM + Reply to Post Go to the top of the page Email Poster
Max™
Post #7 Sep 6 2005, 12:14


Neowin Rocker
Group Icon
Group Icon

Group: Moderator
Posts: 10,974
Joined: 21-April 03
From: Boscastle, Cornwall
Member No.: 26,671
QUOTE(SaLiVa @ Sep 6 2005, 12:57)
Wrong. 10^-3 (To the power of -3)
[right][snapback]586485126[/snapback][/right]

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

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

QUOTE
10−3  milli  m  Thousandth  0.001
Profile Card PM + Reply to Post Go to the top of the page Email Poster
+mrbester
Post #8 Sep 6 2005, 12:17


Be seeing you...
Group Icon
Group Icon

Group: +MVC
Posts: 1,771
Joined: 10-April 02
From: Brighton, Land of the South Saxons, Albion
Member No.: 11,566
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...
Profile Card PM + Reply to Post Go to the top of the page
Elagizy
Post #9 Sep 6 2005, 12:23


Resident Elite
Group Icon

Group: Registered
Posts: 1,123
Joined: 6-June 04
From: Egypt
Member No.: 58,074
QUOTE(huddy @ Sep 6 2005, 11:46)
1,000 milliseconds makes up one second.

Edit : How is VB saying it's 96?
[right][snapback]586485101[/snapback][/right]


CODE

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 ?
Profile Card PM + Reply to Post Go to the top of the page Email Poster
+BudMan
Post #10 Sep 6 2005, 12:32


Neowinian Super Cool
Group Icon
Group Icon

Group: +MVC
Posts: 15,948
Joined: 4-July 02
From: Schaumburg, IL
Member No.: 14,624
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.

Profile Card PM + Reply to Post Go to the top of the page
vetmarkjensen
Post #11 Sep 6 2005, 12:35


Linux noob since Red Hat 5.1
Group Icon
Group Icon

Group: vetVeteran
Posts: 23,144
Joined: 2-October 03
From: Middle Tennessee
Member No.: 36,818
Google: For all your conversion needs. thumbs_up.gif
http://www.google.com/search?q=1+second+in+milliseconds
Profile Card PM + Reply to Post Go to the top of the page Email Poster
Elagizy
Post #12 Sep 6 2005, 12:35


Resident Elite
Group Icon

Group: Registered
Posts: 1,123
Joined: 6-June 04
From: Egypt
Member No.: 58,074
QUOTE(BudMan @ Sep 6 2005, 12:32)
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.
[right][snapback]586485217[/snapback][/right]

WOW, Thanks alot for this link thumbs_up.gif, it really helps.

Thanks all for your help smile.gif
Profile Card PM + Reply to Post Go to the top of the page Email Poster
Elagizy
Post #13 Sep 6 2005, 12:37


Resident Elite
Group Icon

Group: Registered
Posts: 1,123
Joined: 6-June 04
From: Egypt
Member No.: 58,074
QUOTE(markjensen @ Sep 6 2005, 12:35)
Google:  For all your conversion needs. thumbs_up.gif
http://www.google.com/search?q=1+second+in+milliseconds
[right][snapback]586485226[/snapback][/right]


OMG w00t.gif , GOOOOGLE ROCKS rofl.gif
Profile Card PM + Reply to Post Go to the top of the page Email Poster
+BudMan
Post #14 Sep 6 2005, 12:40


Neowinian Super Cool
Group Icon
Group Icon

Group: +MVC
Posts: 15,948
Joined: 4-July 02
From: Schaumburg, IL
Member No.: 14,624
QUOTE(Elagizy @ Sep 6 2005, 06:35)
WOW, Thanks alot for this link thumbs_up.gif, it really helps.
[right][snapback]586485225[/snapback][/right]
Yeah, crazy huh --> who would think to look in the documentation for info rolleyes.gif
Profile Card PM + Reply to Post Go to the top of the page
SaLiVa
Post #15 Sep 8 2005, 12:52


The Only Bruneian Here
Group Icon

Group: Registered
Posts: 2,136
Joined: 3-July 03
From: Southampton, Hampshire
Member No.: 32,056
QUOTE(Max™ @ Sep 6 2005, 20:14)
http://en.wikipedia.org/wiki/SI_prefix

Look at the table. Yes, it is 10^-3, but Milli indicates 'Thou'.
[right][snapback]586485163[/snapback][/right]

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...
Profile Card PM + Reply to Post Go to the top of the page Email Poster
« Older · Programming (C#, C++, JAVA, VB, .NET etc.) · Newer »
 Reply to this topic