---
title: Date.FormatStyle.DateStyle
framework: foundation
role: symbol
role_heading: Structure
path: foundation/date/formatstyle/datestyle
---

# Date.FormatStyle.DateStyle

Type that defines date styles varied in length or components included.

## Declaration

```swift
struct DateStyle
```

## Overview

Overview The exact format depends on the locale. Possible values of date style include omitted, numeric, abbreviated, long, and complete. The following code sample shows a variety of date style format results using the en_US locale. let meetingDate = Date() meetingDate.formatted(date: .omitted, time: .standard)  // 9:42:14 AM

meetingDate.formatted(date: .numeric, time: .omitted)  // 10/17/2020

meetingDate.formatted(date: .abbreviated, time: .omitted) // Oct 17, 2020

meetingDate.formatted(date: .long, time: .omitted)  // October 17, 2020

meetingDate.formatted(date: .complete, time: .omitted)  // Saturday, October 17, 2020

meetingDate.formatted() // 10/17/2020, 9:42 AM The default date style is numeric.

## Topics

### Modifying a Date Style

- [abbreviated](foundation/date/formatstyle/datestyle/abbreviated.md)
- [complete](foundation/date/formatstyle/datestyle/complete.md)
- [long](foundation/date/formatstyle/datestyle/long.md)
- [numeric](foundation/date/formatstyle/datestyle/numeric.md)
- [omitted](foundation/date/formatstyle/datestyle/omitted.md)

### Comparing Date Styles

- [==(_:_:)](foundation/date/==(_:_:).md)

## Relationships

### Conforms To

- [Decodable](swift/decodable.md)
- [Encodable](swift/encodable.md)
- [Equatable](swift/equatable.md)
- [Hashable](swift/hashable.md)
- [Sendable](swift/sendable.md)
- [SendableMetatype](swift/sendablemetatype.md)

## See Also

### Specifying the Date Format

- [day(_:)](foundation/date/formatstyle/day(_:).md)
- [dayOfYear(_:)](foundation/date/formatstyle/dayofyear(_:).md)
- [era(_:)](foundation/date/formatstyle/era(_:).md)
- [month(_:)](foundation/date/formatstyle/month(_:).md)
- [quarter(_:)](foundation/date/formatstyle/quarter(_:).md)
- [week(_:)](foundation/date/formatstyle/week(_:).md)
- [weekday(_:)](foundation/date/formatstyle/weekday(_:).md)
- [year(_:)](foundation/date/formatstyle/year(_:).md)
