<!--
{
  "availability" : [
    "iOS: 9.0.0 -",
    "iPadOS: 9.0.0 -",
    "macCatalyst: 13.0.0 -",
    "macOS: 13.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "HealthKit",
  "identifier" : "/documentation/HealthKit/HKHealthStore/earliestPermittedSampleDate()",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "HealthKit"
    ],
    "preciseIdentifier" : "c:objc(cs)HKHealthStore(im)earliestPermittedSampleDate"
  },
  "title" : "earliestPermittedSampleDate()"
}
-->

# earliestPermittedSampleDate()

Returns the earliest date that the framework permits your app to save or read samples.

```
func earliestPermittedSampleDate() -> Date
```

## Return Value

The earliest date that samples can use. HealthKit doesn’t allow saving or querying samples prior to this date.

## Discussion

Attempts to save samples earlier than this date fail with an [`HKError.Code.errorInvalidArgument`](/documentation/HealthKit/HKError/Code/errorInvalidArgument) error. Attempts to query samples before this date return samples after this date.

This date is a systemwide platform constraint that applies equally to all apps. It isn’t related to what the person chooses to share with your app. To determine whether the person grants your app a limited portion of their health history, use [`getEarliestAuthorizedSampleDate(for:completion:)`](/documentation/HealthKit/HKHealthStore/getEarliestAuthorizedSampleDate(for:completion:)).

---

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)