---
title: "CFDateFormatterCopyProperty(_:_:)"
framework: corefoundation
role: symbol
role_heading: Function
path: "corefoundation/cfdateformattercopyproperty(_:_:)"
---

# CFDateFormatterCopyProperty(_:_:)

Returns a copy of a date formatter’s value for a given key.

## Declaration

```swift
func CFDateFormatterCopyProperty(_ formatter: CFDateFormatter!, _ key: CFDateFormatterKey!) -> CFTypeRef!
```

## Parameters

- `formatter`: The date formatter to examine.
- `key`: The property key for the value to obtain. See doc://com.apple.corefoundation/documentation/CoreFoundation/date-formatter-property-keys for a description of possible values for this parameter.

## Return Value

Return Value A CFType object that is a copy of the property value for key, or NULL if there is no value specified for key. Ownership follows the The Create Rule.

## See Also

### Getting Information About a Date Formatter

- [CFDateFormatterGetDateStyle(_:)](corefoundation/cfdateformattergetdatestyle(_:).md)
- [CFDateFormatterGetFormat(_:)](corefoundation/cfdateformattergetformat(_:).md)
- [CFDateFormatterGetLocale(_:)](corefoundation/cfdateformattergetlocale(_:).md)
- [CFDateFormatterGetTimeStyle(_:)](corefoundation/cfdateformattergettimestyle(_:).md)
