RecurrenceInstances Between Method
This method is used to return all recurring instances between the two specified date/times based on
the current settings.
Definition
Namespace: EWSoftware.PDI
Assembly: EWSoftware.PDI (in EWSoftware.PDI.dll) Version: 2025.1.9.0
Returns a DateTimeCollection of DateTime objects that represent the instances found between the two specified date/times.
Assembly: EWSoftware.PDI (in EWSoftware.PDI.dll) Version: 2025.1.9.0
C#
public DateTimeCollection InstancesBetween(
DateTime fromDate,
DateTime toDate
)VB
Public Function InstancesBetween (
fromDate As DateTime,
toDate As DateTime
) As DateTimeCollectionC++
public:
DateTimeCollection^ InstancesBetween(
DateTime fromDate,
DateTime toDate
)F#
member InstancesBetween :
fromDate : DateTime *
toDate : DateTime -> DateTimeCollection Parameters
- fromDate DateTime
- The minimum date/time on or after which instances should occur
- toDate DateTime
- The maximum date/time on or before which instances should occur
Return Value
DateTimeCollectionReturns a DateTimeCollection of DateTime objects that represent the instances found between the two specified date/times.
Example
C#
// Set up an instance that recurs on the third Tuesday every two months and ends in
// three years.
Recurrence rRecur = new Recurrence();
rRecur.RecurMonthly(DayOccurrence.Third, DaysOfWeek.Tuesday, 2);
rRecur.StartDateTime = DateTime.Today;
rRecur.RecurUntil = DateTime.Today.AddYears(3);
// Get all instances that occur between 12 and 24 months from now
DateTimeCollection recurDates = rRecur.InstancesBetween(
DateTime.Today.AddMonths(12), DateTime.Today.AddMonths(24);VB
' Set up an instance that recurs on the third Tuesday every two months and ends in
' three years.
Dim rRecur As New Recurrence()
rRecur.RecurMonthly(DayOccurrence.Third, DaysOfWeek.Tuesday, 2)
rRecur.StartDateTime = DateTime.Today
rRecur.RecurUntil = DateTime.Today.AddYears(3)
' Get all instances that occur between 12 and 24 months from now
Dim recurDates As DateTimeCollection = rRecur.InstancesBetween(
DateTime.Today.AddMonths(12), DateTime.Today.AddMonths(24)C++
No code example is currently available or this language may not be supported.F#
No code example is currently available or this language may not be supported.