---
title: dateOfBirthComponents()
framework: healthkit
role: symbol
role_heading: Instance Method
path: healthkit/hkhealthstore/dateofbirthcomponents()
---

# dateOfBirthComponents()

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

## Declaration

```swift
func dateOfBirthComponents() throws -> DateComponents
```

## Return Value

Return Value An NSDateComponents object representing the user’s birthdate in the Gregorian calendar, 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.

## See Also

### Reading characteristic data

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