GetSelectedDate

Description

Retrieves the selected date.

Applies to

MonthCalendar control

Syntax

controlname.GetSelectedDate ( d )

Argument

Description

controlname

The name of the MonthCalendar control for which you want to get the selected date

d

A date value returned by reference that indicates the date selected


Return value

Integer.

Returns 0 for success and one of the following negative values otherwise:

-1 -- A range of dates is selected

-2 -- Unknown failure

Usage

If a range of dates is selected, GetSelectedDate returns -1 and retrieves the earliest selected date.

Examples

This example retrieves the selected date into seldate:

integer li_return
Date seldate

li_return = mc_1.GetSelectedDate(seldate)

See also

GetSelectedRange

SetSelectedDate

SetSelectedRange