GetDateWorkingTimeRanges
Definition
This is a function of the SAPCalendar.Calendar library. It retrieves the working time range for a particular date or a period, which you have added to the calendar.
Use
This function is used to get all the working time ranges that are added for a particular day, month or for years.
Structure
Name
GetDateWorkingTimeRanges
Signature
Function GetDateWorkingTimeRanges(varDates, varStartTime, varEndTime, varRecurDay, varRecurMonth, RecurYear) As Long
Parameters
Dates as Variant
StartTime as Variant
EndTime as Variant
RecurDay as Variant
RecurMonth as Variant
RecurYear as Variant
lngCount as Long
Example
To retrieve the number of working time ranges that have been set for a particular date.
Case: Assume that the following working time range has been added
"Jan/1/2002" - "10:00 AM to "2:00 PM"
"Jan/1/2002" - "3:00 PM to "6:00 PM"
'Define the variables
Dim varDates as Variant
Dim varStartTime as variant
Dim varEndTime as Variant
Dim varRecurDay as Variant
Dim VarRecurMonth as variant
Dim varRecurYear as variant
Dim lngCount as long
'Get the information from the calendar
lngCount = pObjCalendar.GetDateWorkingTimeRanges( varDates, varStartTime, varEndTime, varRecurDay, varRecurMonth, varRecurYear)
This function will return the following variables with the retrieved values:
varDates - [0] "Jan/1/2002" , [1] "Jan/1/2002"
varStarTime - [0] "10:00 AM", [1] "3:00 PM"
varEndTime - [0] "2:00 PM", [1] "6:00 PM"
varRecurDay - [0] "False", [1] "False"
varRecurMOnth - [0] "False", [1] "False"
varRecurYear - [0] "False", [1] "False"
lngCount – 2
The values retrieved in this manner are used by the calendar for any changes that must be done.
See also: