Show current date & system time with milliseconds

Category:
Dates and Math
Type:
Snippets
Difficulty:
Beginning
Author:
Brian M. Matumbura

Version Compatibility: Visual Basic 6, Visual Basic 5

More information:
Ever wondered how you can show the current system date and time, including milliseconds? Here is how... The format$ function in VB doesn't seem to have a way of getting the milliseconds in Time. The function in the code shows how you can easily achieve this. Sample usage: Private Sub Command1_Click() MsgBox MyTime End Sub

Instructions: Copy the declarations and code below and paste directly into your VB project.

Declarations:

Code: