Sets the date and time in the Value property of the control.
DatePicker control
controlname.SetValue ( d, t )
controlname.SetValue ( dt )
Argument |
Description |
---|---|
controlname |
The name of the control for which you want to set the date and time |
d |
The date value to be set in the Value property |
t |
The time value to be set in the Value property |
dt |
The DateTime value to be set in the Value property |
Integer. Returns 1 for success and one of the following negative values for failure:
-1 The value cannot be set
-2 Other error
The SetValue function can set the Value property using separate date and time variables or a single DateTime variable.
This example sets the Value property of a DatePicker control using separate date and time values:
date d time td=date("2007/12/27") t=time("12:00:00")dp_1.SetValue(d, t)
This example sets the Value property using a DateTime value:
date d time t datetime dt dt = DateTime(d, t) dp_1.SetValue(dt)