This function returns the date and time stored in a Date Time Picker control in standard "datetime" format.
cGetDTPDate (window-handle)
(i) window-handle Windows handle to a Date Time Picker common control.
(s) date-time Time in YYYY:MM:DD:HH:MM:SS format.
This function returns the date and time stored in a Date Time Picker control in standard "datetime" format. The output can be passed directly to any WIL time function that accepts the standard YMDHMS format. All parts of the standard format will be returned even if the control only displays partial information.
The class name for the Date Time Picker control is "SysDateTimePick32".
AddExtender("wwctl44i.dll",0,"wwctl64i.dll")
; Get a handle hwndex = DllHwnd("Microsoft Control Spy") hwnd = cWndbyclass(hwndex,"CSPYContainer") hwnd = cWndbyclass(hwnd,"SysDateTimePick32") ; Get the time set in the control. ctldatetime = cGetDtpDate( hwnd ) ;subract a year and a second. ctldatetime = TimeSubtract(ctldatetime, "01:00:00:00:00:01") If cSetDtpDate(hwnd, ctldatetime) ctldatetime = cGetDtpDate( hwnd ) Message(" New DateTime", ctldatetime) EndIf
cSetDTPDate, cWndByClass, cWndInfo, DLLhwnd (WIL help).