Change the values of a Date Time Picker control.
cSetDTPDate (window-handle, date-time)
(i) window-handle Windows handle to a Date Time Picker common control.
(s) date-time Time in YYYY:MM:DD:HH:MM:SS format.
(i) @TRUE, if new date-time set; @FALSE, if new date-time was not set
You can change the values of a Date Time Picker control with this function. The input date and time must be in the standard "datetime" format. The function accepts both two and four digit years. It assumes that years 50-99 are from 1950 to 1999 and years 00-49 are years 2000 to 2049. If you wish to input years from the first century, prefix the years with two zeros, i.e., 0049.
A control may not display all parts of the standard date-time format. However, an error will occur if any part is missing from the date-time string. This is because the control stores all parts of the format even if it only displays some parts. A Date Time Picker control may have a minimum and maximum range. This function will report an error if an input date falls outside of this range.
The class name for this control is "SysDateTimePick32".
32-bit Extender
This function is designed for Windows 32-bit application controls. It cannot be used on Windows 64-bit controls.
64-bit Extender
This function is designed for Windows 64-bit application controls. It cannot be used on Windows on 32-bit controls.
AddExtender("wwctl44i.dll",0,"wwctl64i.dll") ; Get a handle hwndex = DllHwnd("Microsoft Control Spy") hwnd = cWndbyclass(hwndex,"CSPYContainer") hwnd = cWndbyclass(hwnd,"SysDateTimePick32") startdate = "1899:2:28:0:0:0" If cSetDtpDate(hwnd, startdate) Message("Set date/time", startdate) Else Message("Set date/time", "Failed") EndIf Exit
cWndByClass, cWndinfo, DLLhwnd (WIL help).