|
-
Jun 12th, 2002, 12:33 AM
#1
Thread Starter
Hyperactive Member
Problems with the Format function
I know this is a noob question but here goes:
Here is a snippit of code:
millsec = millsec + 1
lblMilli.Text = millsec
lblSeconds.Text = Format(millsec / 1000, "##")
This code is inside a timer control with an interval of 1. As you can see, I'm trying to convert milliseconds to seconds by dividing
millsec (which represents the number of milliseconds which have gone by) by 1000. I then try to format this number to only have two digits using the format function. Instead of having the seconds field go up one every 1000 millisecond it goes up one every 500 milliseconds. I get rid of the formating and everything works (with all the decimal places). I'm using an integer data type for millsec. I hope this isn't too much. Any help appreciated.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|