VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Function CurrentTime. Returns the COMPLETE system time, including milliseconds (something VB's date

by Brien Schultz (1 Submission)
Category: Windows API Call/Explanation
Compatability: Visual Basic 4.0 (32-bit)
Difficulty: Unknown Difficulty
Originally Published: Tue 2nd October 2001
Date Added: Mon 8th February 2021
Rating: (1 Votes)

Function CurrentTime. Returns the COMPLETE system time, including milliseconds (something VB's date/time func doesn't do).

API Declarations



Private Type SYSTEMTIME
wYear As Integer
wMonth As Integer
wDayOfWeek As Integer
wDay As Integer
wHour As Integer
wMinute As Integer
wSecond As Integer
wMilliseconds As Integer
End Type

Rate Function CurrentTime. Returns the COMPLETE system time, including milliseconds (something VB's date



Dim SYSTEMTIME As SYSTEMTIME
GetLocalTime SYSTEMTIME
CurrentTime = SYSTEMTIME.wYear & "/" & SYSTEMTIME.wMonth & "/" & SYSTEMTIME.wDay & " " & SYSTEMTIME.wHour & ":" & SYSTEMTIME.wMinute & ":" & SYSTEMTIME.wSecond & "." & SYSTEMTIME.wMilliseconds
End Function

Download this snippet    Add to My Saved Code

Function CurrentTime. Returns the COMPLETE system time, including milliseconds (something VB's date Comments

No comments have been posted about Function CurrentTime. Returns the COMPLETE system time, including milliseconds (something VB's date. Why not be the first to post a comment about Function CurrentTime. Returns the COMPLETE system time, including milliseconds (something VB's date.

Post your comment

Subject:
Message:
0/1000 characters