---
title: mostRecentQuantityDateInterval()
framework: healthkit
role: symbol
role_heading: Instance Method
path: healthkit/hkstatistics/mostrecentquantitydateinterval()
---

# mostRecentQuantityDateInterval()

Returns the date interval of the most recent sample that matches the query.

## Declaration

```swift
func mostRecentQuantityDateInterval() -> DateInterval?
```

## See Also

### Related Documentation

- [discreteMostRecent](healthkit/hkstatisticsoptions/discretemostrecent.md)

### Getting the Most Recent Quantity

- [mostRecentQuantity()](healthkit/hkstatistics/mostrecentquantity().md)
- [mostRecentQuantity(for:)](healthkit/hkstatistics/mostrecentquantity(for:).md)
- [mostRecentQuantityDateInterval(for:)](healthkit/hkstatistics/mostrecentquantitydateinterval(for:).md)
