<!--
{
  "availability" : [
    "iOS: 26.0.0 -",
    "iPadOS: 26.0.0 -",
    "macCatalyst: 26.0.0 -",
    "macOS: 26.0.0 -",
    "visionOS: 26.0.0 -",
    "watchOS: 26.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "HealthKit",
  "identifier" : "/documentation/HealthKit/HKQuery/predicateForMedicationDoseEvent(scheduledStart:end:)",
  "metadataVersion" : "0.1.0",
  "role" : "Type Method",
  "symbol" : {
    "kind" : "Type Method",
    "modules" : [
      "HealthKit"
    ],
    "preciseIdentifier" : "c:objc(cs)HKQuery(cm)predicateForMedicationDoseEventWithScheduledStartDate:endDate:"
  },
  "title" : "predicateForMedicationDoseEvent(scheduledStart:end:)"
}
-->

# predicateForMedicationDoseEvent(scheduledStart:end:)

```
class func predicateForMedicationDoseEvent(scheduledStart startDate: Date?, end endDate: Date?) -> NSPredicate
```

## Parameters

`startDate`

The beginning of the window for scheduled dates of any medication dose event to match.

`endDate`

The beginning of the window for scheduled dates of any medication dose event to match.

## Discussion

\abstract Creates a predicate for use with HKQuery subclasses.
\discussion Creates a query predicate that matches HKMedicationDoseEvent samples that have a scheduled date within a window of scheduled times. If nil is provided to either parameter, the respective side of the window is unbound.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)