SetValue

Description

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

Applies to

DatePicker control

Syntax

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

Returns

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

Usage

The SetValue function can set the Value property using separate date and time variables or a single DateTime variable.

Examples

Example 1

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)

See also