WinBatch Tech Support Home

Database Search

If you can't find the information using the categories below, post a question over in our WinBatch Tech Support Forum.

TechHome

Time - Timer and Date Functions
plus

Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.

How to Change Date Time Properties

Keywords: 	 date time

Question:

Do you have an example of how to change the date time properties?

Answer:

AddExtender("wwctl34I.dll")

; Setup date and time
RUN ("rundll32.exe","shell32.dll,Control_RunDLL timedate.cpl")
netwnd=DllHwnd("Date/Time Properties")
systabwnd=cWndByClass(netwnd,"SysTabControl32")
cSetTabItem(systabwnd,2)

srvhwnd=cWndByName(netwnd,"Time Zone")
lbWnd=cWndByID(srvhwnd, 101)  ;READS COMBO-BOX CONTROL, THE IDENT=101

response=cGetCBText(lbWnd)
response=strreplace(response,@tab,@crlf)
Message("Response",response)

prefchkbox=cWndByname(srvhwnd,"Automatically adjust clock for daylight saving changes")
chk=cCheckbox(prefchkbox,-1)

if chk==1
  Message("Use Preferred Devices is set to",chk)
else
  cCheckbox(prefchkbox, 1)
endif

Article ID:   W13860
Filename:   Change Date Time Properties.txt
File Created: 2001:03:01:12:15:02
Last Updated: 2001:03:01:12:15:02