Value
property for PowerScript controls
Applies to
DatePicker controls
Description
Specifies the date/time value assigned to the control. The date part
of the Value property uses the format for short dates specified in the
regional settings in the Windows control panel on the local computer. The
time part of the Value property uses the time format specified in regional
settings.
The Value defaults to the current date and time.
Usage
In the painter
To set the Value property:
-
Select a date from the Value drop-down calendar on the General
page of the Properties view or type a date and optional time into the
Value box.
In scripts
The Value property takes a DateTime value. The value you assign must
be capable of being interpreted as a DateTime value. You can use the
DateValue and TimeValue properties to extract the date and time parts of
the Value property.
This example sets the Value property to midday on July 1, 2005. The
display format depends on the value of the Format and CustomFormat
properties and the regional settings for date and time on the local
computer:
|
1 |
dp_1.Value = DateTime(Date("2005/07/01"),Time("12:00:00")) |