Restored from previous forum. Originally posted by wayne1.
Code: Select all
;wYear
;Specifies the current year.
;wMonth
;Specifies the current month; January = 1, February = 2, and so on.
;wDayOfWeek
;Specifies the current day of the week; Sunday = 0, Monday = 1, and so on.
;wDay
;Specifies the current day of the month.
;wHour
;Specifies the current hour.
;wMinute
;Specifies the current minute.
;wSecond
;Specifies the current second.
;wMilliseconds
;Specifies the current millisecond.
;The wDayOfWeek member of the Time Structure is ignored.
Structure Time
wYear.w ;
wMonth.w ;
wDayOfWeek.w ;
wDay.w ;
wHour.w ;
wMinute.w ;
wSecond.w ;
wMilliseconds.w ;
EndStructure
Dim SetTime.Time(0)
SetTime(0)\wYear = 1993
SetTime(0)\wMonth=1
;SetTime(0)\wDayOfWeek=0
SetTime(0)\wDay=8 ;I dont know why but day of the month starts at 2 instead of one (on mine anyway)
SetTime(0)\wHour=2 ; (UTC)
SetTime(0)\wMinute=23
SetTime(0)\wSecond=12
SetTime(0)\wMilliseconds=3
Result = MessageRequester("New Date and Time", "Allow program to reset date and time to " + Str(SetTime(0)\wMonth) + "\"+ Str(SetTime(0)\wDay - 1)+ " \"+ Str(SetTime(0)\wYear) + "?", #PB_MessageRequester_YesNo)
If Result = #PB_MessageRequester_Yes
SetSystemTime_(SetTime(0));
Result = MessageRequester("New Date and Time", "Date was reset to " + Str(SetTime(0)\wMonth) + "\"+ Str(SetTime(0)\wDay - 1)+ " \"+ Str(SetTime(0)\wYear) + " the time was also reset",0)
Endif
Edited by - wayne1 on 10 July 2001 04:06:53