RecurrenceInstancesBetween Method
This method is used to return all recurring instances between the two specified date/times based on
the current settings.
Namespace: EWSoftware.PDIAssembly: EWSoftware.PDI (in EWSoftware.PDI.dll) Version: 2023.1.2.0
public DateTimeCollection InstancesBetween(
DateTime fromDate,
DateTime toDate
)
Public Function InstancesBetween (
fromDate As DateTime,
toDate As DateTime
) As DateTimeCollection
public:
DateTimeCollection^ InstancesBetween(
DateTime fromDate,
DateTime toDate
)
member InstancesBetween :
fromDate : DateTime *
toDate : DateTime -> DateTimeCollection
- 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
DateTimeCollectionReturns a
DateTimeCollection of
DateTime objects that represent
the instances found between the two specified date/times.
// 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);
' 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)
No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.