Article ID: 154009
Article Last Modified on 7/13/2004
Option Explicit
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
Private Declare Function SetSystemTime Lib "kernel32" (lpSystemTime _
As SYSTEMTIME) As Long
Private Sub Form_Load()
Dim lReturn As Long
Dim lpSystemTime As SYSTEMTIME
lpSystemTime.wYear = 1996
lpSystemTime.wMonth = 6
lpSystemTime.wDayOfWeek = 5
lpSystemTime.wDay = 28
lpSystemTime.wHour = 9
lpSystemTime.wMinute = 42
lpSystemTime.wSecond = 0
lpSystemTime.wMilliseconds = 0
lReturn = SetSystemTime(lpSystemTime)
End Sub
WYear Integer-The current year. WMonth Integer-The current month. January is 1. WDayOfWeek Integer-The current day of the week. Sunday is 0. WDay Integer-The current day of the month. WHour Integer-The current hour. wMinute Integer-The current minute. wSecond Integer-The current second. wMilliseconds Integer-The current millisecond.
Keywords: kbhowto kbapi KB154009