Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Time in Milliseconds

Status
Not open for further replies.

jmarler

Programmer
Joined
Jan 29, 2001
Messages
679
Location
US
Does anyone know of a way to format the Date command or the Now command so that it will return milliseconds along with the actual HH:MM:SS data? - Jeff Marler B-)
 
If you put it into a double then the fractional part is the "part" of the day. There are 86400000 (24*60*60*1000) milliseconds in a day. Generate Forms/Controls Resizing/Tabbing Class
Compare Code (Text)
Generate Sort Class in VB or VBScript
 
Thanks John . . . actually, someone at work gave me what I need. It's simply Format$(Now, "hh:mm:ss:ms"). - Jeff Marler B-)
 
Hi Jeff,

I was looking for the same thing.
The other threads explain why milliseconds are not available.
I was intrigued by your solution and tried it out.

It looked good. A three digit return.
Then I realised the 'ms' simply returns the month and the second.

I guess you reve realised this by now.

Ciao,

kyran.
 
jmarler -
Something you should be aware of is that the PC clock isn't accurate to milliseconds. So even if you used the GetTickCount Win32 api function, it's not that accurate.

Chip H.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top