GetDayWorkingTimeRanges

Definition

This is a method of the SAPCalendar.Calendar library. It retrieves all the working time ranges for different days of the week that have been added to the calendar.

Use

This method is used to get the working time ranges added for days of the week. These details are used to either modify settings or to check the existing settings, before adding a new working time range for a particular day.

Structure

The GetDayWorkingTimeRanges method has the following characteristics:

Name

GetDayWorkingTimeRanges

Signature

Function GetDayWorkingTimeRanges(varDays, varStartTime, varEndTime) As Long

Parameters

varDays as Variant

varStartTime as Variant

varEndTime as Variant

lngCount as Long

Example

To get the number of working time ranges and the start time and end time that have been added for a particular day.

Assume that the day working time ranges have been set for Monday and Tuesday as follows:

Monday – 10:00 AM to 3:00 PM and

Tuesday – 4:00 PM to 8: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(varDays, varStartTime, varEndTime)

The return values in this example are:

varDays – [0] "2", [1] "3"

varStartTime - [0] "10:00 AM", [1] "4:00 PM"

varEndTime - [0] "3:00 PM", [1] "8:00 PM"

lngCount - 2

See also:

GetDateWorkingTimeRanges

GetDefaultWorkingTimeRanges