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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

format date miliseconds

Status
Not open for further replies.

DeSn

Programmer
Nov 20, 2001
111
BE
I know the date/time format "dd/mm/yyyy hh:mm:ss" but what's the format for milliseconds? And why does the date-type doesn't know milliseconds in the following way: 02/02/2002 11:16:56.120 ?

Thanks
 
The 'clock' resoloution in the "PC" is not sufficiently precise to warrant the use or display of milliseconds. The standard clock is 18 'ticks' per second or so.

If you use the API calls, you can get more accurate time, but AFAIK, the MS Date data type doesn't support the display of these, so you also need custom display routines.

MichaelRed
m.red@att.net

There is never time to do it right but there is always time to do it over
 
VB versions prior to VB.NET don't return milliseconds in the Date type, I'm afraid.

Also, as MichaelRed states, the system clock is only accurate to about 55ms. So even if the Date type {b]did[/b] support milliseconds you could not rely on it to actually return values accurate to a millisecond.

Perhaps it would be pertinent to ask why you need milliseconds.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top