<!--
{
  "availability" : [
    "iOS: -",
    "iPadOS: -",
    "macCatalyst: -",
    "macOS: -",
    "tvOS: -",
    "visionOS: -",
    "watchOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "CoreFoundation",
  "identifier" : "/documentation/CoreFoundation/CFDateFormatterGetFormat(_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Function",
  "symbol" : {
    "kind" : "Function",
    "modules" : [
      "Core Foundation"
    ],
    "preciseIdentifier" : "c:@F@CFDateFormatterGetFormat"
  },
  "title" : "CFDateFormatterGetFormat(_:)"
}
-->

# CFDateFormatterGetFormat(_:)

Returns a format string for the given date formatter object.

```
func CFDateFormatterGetFormat(_ formatter: CFDateFormatter!) -> CFString!
```

## Parameters

`formatter`

The date formatter to examine.

## Return Value

The format string for `formatter` as was specified by calling the [`CFDateFormatterSetFormat(_:_:)`](/documentation/CoreFoundation/CFDateFormatterSetFormat(_:_:)) function, or derived from the date formatter’s date or time styles. Ownership follows the [The Get Rule](https://developer.apple.com/library/archive/documentation/CoreFoundation/Conceptual/CFMemoryMgmt/Concepts/Ownership.html#//apple_ref/doc/uid/20001148-SW1).

## Discussion

---

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)