GetValue

Description

Returns the date and time in the Value property of the control.

Applies to

DatePicker control

Syntax

controlname.GetValue ( d, t )
controlname.GetValue ( dt )

Argument

Description

controlname

The name of the control for which you want to get the date and time

d

The date value in the Value property returned by reference

t

The time value in the Value property returned by reference

dt

The DateTime value in the Value property returned by reference

Returns

Integer. Returns 1 for success and one of the following negative values for failure:

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

Example 1

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:

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