Syntax 1: for DatePicker control
Description
Returns the date and time in the Value property of the
control.
Applies to
DatePicker control
Syntax
|
1 2 |
controlname.GetValue ( d, t ) controlname.GetValue ( dt ) |
|
Argument |
Description |
|---|---|
|
controlname |
The name of the control for which you want to get the |
|
d |
The date value in the Value property returned by |
|
t |
The time value in the Value property returned by |
|
dt |
The DateTime value in the Value property returned by |
Return value
Integer.
Returns 1 for success and one of the following negative values for
failure:
-1 — Invalid date and/or time values
-2 — Other error
Usage
The GetValue function can return the date and time parts of the
Value property in separate date and time variables or a single DateTime
variable.
Examples
In this example, the GetValue function is called twice, once to
return separate date and time values and once to return a DateTime
value. The values returned are written to a multiline edit
control:
|
1 2 3 4 5 6 7 8 9 10 11 |
date d time t datetime dt integer li_ret1, li_ret2 li_ret1 = dp_1.GetValue(d, t) li_ret2 = dp_1.GetValue(dt) mle_1.text += string(d) + " ~r~n" mle_1.text += string(t) + " ~r~n" mle_1.text += string(dt) + " ~r~n" |
See also