---
title: dateOfBirth()
framework: healthkit
role: symbol
role_heading: Instance Method
path: healthkit/hkhealthstore/dateofbirth()
---

# dateOfBirth()

Reads the user’s date of birth from the HealthKit store as a date value.

## Declaration

```swift
func dateOfBirth() throws -> Date
```

## Mentioned in

About the HealthKit framework

## Return Value

Return Value An NSDate object representing the user’s birthdate, or nil.

## Discussion

Discussion If the user has not yet specified a birth date, or if the user has denied your app permission to read the birth date, this method returns nil. note: In Swift, this method returns a nonoptional result and is marked with the throws keyword to indicate that it throws an error in cases of failure. You call this method in a try expression and handle any errors in the catch clauses of a do statement, as described in Error Handling in The Swift Programming Language and About Imported Cocoa Error Parameters.

## See Also

### Reading characteristic data

- [biologicalSex()](healthkit/hkhealthstore/biologicalsex().md)
- [bloodType()](healthkit/hkhealthstore/bloodtype().md)
- [dateOfBirthComponents()](healthkit/hkhealthstore/dateofbirthcomponents().md)
- [fitzpatrickSkinType()](healthkit/hkhealthstore/fitzpatrickskintype().md)
- [wheelchairUse()](healthkit/hkhealthstore/wheelchairuse().md)
