GetDateLimits
PowerScript function
Description
Retrieves the maximum and minimum date limits specified for the
calendar.
Applies to
MonthCalendar control
Syntax
|
1 |
controlname.GetDateLimits ( min, max ) |
|
Argument |
Description |
|---|---|
|
controlname |
The name of the MonthCalendar control for which you want |
|
min |
A date value returned by reference that represents the |
|
max |
A date value returned by reference that represents the |
Return value
Integer.
Returns 0 when both limits are retrieved successfully and one of the
following negative values otherwise:
-1 — No limits were set
-2 — Unknown failure
Usage
Use the SetDateLimits function to set minimum and maximum dates. If
no date limits have been set, GetDateLimits returns -1 and sets min and
max to January 1, 1900.
Examples
This example displays a message box that shows the minimum and
maximum dates set for a control:
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
integer li_return Date mindate, maxdate string str1, str2 li_return = mc_1.GetDateLimits(mindate, maxdate) If li_return = -1 then str1 = "No minimum and maximum dates are set" elseif li_return = -2 then str1 = "Unknown failure" else str1 = "Minimum date is " + string(mindate) str2 = "Maximum date is " + string(maxdate) end if MessageBox("Date Limits", str1 + "~r~n" + str2) |
See also