<!--
{
  "availability" : [
    "iOS: 15.4.0 -",
    "iPadOS: 15.4.0 -",
    "macCatalyst: 15.4.0 -",
    "macOS: 12.3.0 -",
    "tvOS: 15.4.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 8.5.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "TabularData",
  "identifier" : "/documentation/TabularData/CSVWritingOptions/dateFormatter",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "TabularData"
    ],
    "preciseIdentifier" : "s:11TabularData17CSVWritingOptionsV13dateFormatterySS10Foundation4DateVcvp"
  },
  "title" : "dateFormatter"
}
-->

# dateFormatter

A closure that maps dates to their string representations.

```
var dateFormatter: (Date) -> String { get set }
```

## Discussion

Defaults to ISO 8601 encoding.

---

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)