# C1.Schedule.AppointmentCollection.GetOccurrences

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="C1_Schedule_AppointmentCollection_GetOccurrences_" data-uid="C1.Schedule.AppointmentCollection.GetOccurrences*">GetOccurrences Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="C1_Schedule_AppointmentCollection_GetOccurrences_" data-uid="C1.Schedule.AppointmentCollection.GetOccurrences*"></a>
<h4 id="C1_Schedule_AppointmentCollection_GetOccurrences_System_DateTime_System_DateTime_" data-uid="C1.Schedule.AppointmentCollection.GetOccurrences(System.DateTime,System.DateTime)">GetOccurrences(DateTime, DateTime)</h4>
<div class="markdown level1 summary"><p>Retrieves the <a class="xref" href="C1.Schedule.AppointmentList.html">AppointmentList</a> object which contains
the full list of <a class="xref" href="C1.Schedule.Appointment.html">Appointment</a> objects in the specified time interval.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public AppointmentList GetOccurrences(DateTime start, DateTime end)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Function GetOccurrences(start As Date, [end] As Date) As AppointmentList</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.datetime">DateTime</a></td>
      <td><span class="parametername">start</span></td>
      <td><p>The <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.datetime">DateTime</a> value which specifies
the start date and time of the interval.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.datetime">DateTime</a></td>
      <td><span class="parametername">end</span></td>
      <td><p>The <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.datetime">DateTime</a> value which specifies
the end date and time of the interval.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 class="returns">Returns</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="C1.Schedule.AppointmentList.html">AppointmentList</a></td>
      <td><p>The <a class="xref" href="C1.Schedule.AppointmentList.html">AppointmentList</a> object.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 id="C1_Schedule_AppointmentCollection_GetOccurrences_System_DateTime_System_DateTime__remarks">Remarks</h5>
<div class="markdown level1 remarks"><p>This method will create instances of the <a class="xref" href="C1.Schedule.Appointment.html">Appointment</a>
object for recurring appointments if they haven't been created yet.</p>
</div>


<a id="C1_Schedule_AppointmentCollection_GetOccurrences_" data-uid="C1.Schedule.AppointmentCollection.GetOccurrences*"></a>
<h4 id="C1_Schedule_AppointmentCollection_GetOccurrences_C1_Schedule_BaseObject_System_String_System_DateTime_System_DateTime_System_Boolean_" data-uid="C1.Schedule.AppointmentCollection.GetOccurrences(C1.Schedule.BaseObject,System.String,System.DateTime,System.DateTime,System.Boolean)">GetOccurrences(BaseObject, string, DateTime, DateTime, bool)</h4>
<div class="markdown level1 summary"><p>Retrieves the <a class="xref" href="C1.Schedule.AppointmentList.html">AppointmentList</a> object which contains
the full list of <a class="xref" href="C1.Schedule.Appointment.html">Appointment</a> objects in the specified time interval.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public AppointmentList GetOccurrences(BaseObject groupOwner, string groupBy, DateTime start, DateTime end, bool includePrivateAppointments)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Function GetOccurrences(groupOwner As BaseObject, groupBy As String, start As Date, [end] As Date, includePrivateAppointments As Boolean) As AppointmentList</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="C1.Schedule.BaseObject.html">BaseObject</a></td>
      <td><span class="parametername">groupOwner</span></td>
      <td><p>The <a class="xref" href="C1.Schedule.BaseObject.html">BaseObject</a> object determining the appointment group.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></td>
      <td><span class="parametername">groupBy</span></td>
      <td><p>The <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a> value determining the type of grouping.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.datetime">DateTime</a></td>
      <td><span class="parametername">start</span></td>
      <td><p>The <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.datetime">DateTime</a> value which specifies
the start date and time of the interval.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.datetime">DateTime</a></td>
      <td><span class="parametername">end</span></td>
      <td><p>The <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.datetime">DateTime</a> value which specifies
the end date and time of the interval.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></td>
      <td><span class="parametername">includePrivateAppointments</span></td>
      <td><p>The <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a> value determining whether
to include private appointments.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 class="returns">Returns</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="C1.Schedule.AppointmentList.html">AppointmentList</a></td>
      <td><p>The <a class="xref" href="C1.Schedule.AppointmentList.html">AppointmentList</a> object.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 id="C1_Schedule_AppointmentCollection_GetOccurrences_C1_Schedule_BaseObject_System_String_System_DateTime_System_DateTime_System_Boolean__remarks">Remarks</h5>
<div class="markdown level1 remarks"><p>This method will create instances of the <a class="xref" href="C1.Schedule.Appointment.html">Appointment</a>
object for recurring appointments if they haven't been created yet.</p>
</div>


<a id="C1_Schedule_AppointmentCollection_GetOccurrences_" data-uid="C1.Schedule.AppointmentCollection.GetOccurrences*"></a>
<h4 id="C1_Schedule_AppointmentCollection_GetOccurrences_C1_Schedule_Appointment_System_DateTime_System_DateTime_" data-uid="C1.Schedule.AppointmentCollection.GetOccurrences(C1.Schedule.Appointment,System.DateTime,System.DateTime)">GetOccurrences(Appointment, DateTime, DateTime)</h4>
<div class="markdown level1 summary"><p>Retrieves the <a class="xref" href="C1.Schedule.AppointmentList.html">AppointmentList</a> object which contains
the list of occurrences of the specified master appointment
in the specified time interval.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public AppointmentList GetOccurrences(Appointment appointment, DateTime start, DateTime end)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Function GetOccurrences(appointment As Appointment, start As Date, [end] As Date) As AppointmentList</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="C1.Schedule.Appointment.html">Appointment</a></td>
      <td><span class="parametername">appointment</span></td>
      <td><p>The <a class="xref" href="C1.Schedule.Appointment.html">Appointment</a> object
representing the master appointment.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.datetime">DateTime</a></td>
      <td><span class="parametername">start</span></td>
      <td><p>The <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.datetime">DateTime</a> value which specifies
the start date and time of the interval.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.datetime">DateTime</a></td>
      <td><span class="parametername">end</span></td>
      <td><p>The <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.datetime">DateTime</a> value which specifies
the end date and time of the interval.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 class="returns">Returns</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="C1.Schedule.AppointmentList.html">AppointmentList</a></td>
      <td><p>The <a class="xref" href="C1.Schedule.AppointmentList.html">AppointmentList</a> object.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 id="C1_Schedule_AppointmentCollection_GetOccurrences_C1_Schedule_Appointment_System_DateTime_System_DateTime__remarks">Remarks</h5>
<div class="markdown level1 remarks"><p>This method will create instances of the <a class="xref" href="C1.Schedule.Appointment.html">Appointment</a>
object for recurring appointments if they haven't been created yet.</p>
</div>
</div>
