Events.Events
-------------

Queries events in a given time range.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [Events](component_Events.md) | [6.2](newinversion62.md) | ✅ Yes | ❌ No | ❌ No | ❌ No | ✅ Yes |

MBS( "Events.Events" { ; StartDate; EndDate; Calendars } ) 

**MBS**( **"Events.Events";** /\* Queries events in a given time range. \*/  
**$StartDate**; /\* Optional; The start date to search from.  
Can be empty. \*/   
**$EndDate**; /\* Optional; The end date to search before. \*/   
**$Calendars**) /\* Optional; The identifier for the calendar you want to search.  
Leave empty to search all. \*/ 

### Parameters

| Parameter | Description | Example | Flags |
|---|---|---|---|
| StartDate | The start date to search from.   Can be empty. |  | Optional |
| EndDate | The end date to search before. |  | Optional |
| Calendars | The identifier for the calendar you want to search.   Leave empty to search all. |  | Optional |

### Result

Returns list or error.

### Description

Queries events in a given time range.  
You can use this function to search for events between a range of dates.  
You can pass nothing for start date to find all events before endDate.  
You can pass nothing for both start and end date to get all events in the specified calendars.  
You can pass nothing for calendars to fetch from all available calendars.  
OS X Only: For performance reasons, this method will only return events within a four year timespan.  
If the date range between the startDate and endDate is greater than four years, then it will be shortened to the first four years.  
  
For events with occurrence dates, we return a 5 digit ID assigned by the plugin to distinguish between different occurrences.  
### Examples

Find events within next 24 hours:

 MBS ( "Events.Events"; get(CurrentHostTimestamp); get(CurrentHostTimestamp) + 24 \* 60 \* 60 )  
### See also

- [Events.SetNotification](EventsSetNotification.md)
- [Events.SetNotificationEvaluate](EventsSetNotificationEvaluate.md)

### Example Databases

- [Mac and iOS/Events/Events Changes](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/Mac%20and%20iOS/Events/Events%20Changes.shtml#3ScriptAnchor_)
- [Mac and iOS/Events/Events Import](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/Mac%20and%20iOS/Events/Events%20Import.shtml#1ScriptAnchor_)
- [Mac and iOS/Events/Events Sync](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/Mac%20and%20iOS/Events/Events%20Sync.shtml#6ScriptAnchor_)

### Blog Entries

- [New in MBS FileMaker Plugin 12.0](https://www.mbsplugins.de/archive/2022-01-31/New_in_MBS_FileMaker_Plugin_12/monkeybreadsoftware_blog_filemaker)

### FileMaker Magazin

- [Ausgabe 3/2020, Seite 40](https://filemaker-magazin.de/neuigkeit/4096-Appetithappen-FMM_202003)

This function checks for a license.

Created 10th March 2016 , last changed 2nd May 2023

  
[Events.EventStoreIdentifier](EventsEventStoreIdentifier.md) - [Events.IncompleteReminders](EventsIncompleteReminders.md)

[HTML Version](EventsEvents.shtml)