GetDefaultWorkingTimeRanges

Definition

This is a method of the SAPCalendar.Calendar library. It retrieves working time ranges that are set as default in the calendar.

Use

This method is used to get the default working time range that has been added. These details are used to either modify the existing default settings or to check the existing settings, before adding another default working time range.

Structure

The GetDefaultWorkingTimeRanges method has the following characteristics:

Name

GetDefaultWorkingTimeRanges

Signature

Function GetDefaultWorkingTimeRanges (varStartWorkingTimes, varEndWorkingTime) As Long

Parameters

varStartWorkingTimes as Variant

varEndWorkingTimes as Variant

Example

To get the number of default working time ranges that have been added along with the start time and end time of each of these.

In this example, the default working time ranges set are:

8:00 AM to 2:00 PM

3:00 PM to 6:00 PM

‘Define the variables

Dim varStartWorkingTimes as Variant

Dim varEndWorkingTimes as Variant

Dim lngCount as Long

LngCount = 0

‘Get details from the calendar

lngCount = pObjCalendar.GetDefaultWorkingTimeRanges (varStartWorkingTimes, varEndWorkingTime)

The return values in this example will be:

lngCount will contain 2 indicating the maximum number of default working time ranges found.

varStartWorkingTimes will contain the two start working times as:

varStartWorkingTimes:

[0] "8:00 AM"

[1] "3:00 PM"

varEndWorkingTimes will contain the two end working times as:

varEndWorkingTimes:

[0] "2:00 PM"

[1] "6:00 PM"

See also:

GetDateWorkingTimeRanges

GetDayWorkingTimeRanges