---
title: "string(from:)"
framework: foundation
role: symbol
role_heading: Instance Method
path: "foundation/dateformatter/string(from:)"
---

# string(from:)

Returns a string representation of a specified date that the system formats using the receiver’s current settings.

## Declaration

```swift
func string(from date: Date) -> String
```

## Parameters

- `date`: The date to format.

## Return Value

Return Value A string representation of date.

## Discussion

Discussion For more information about using DateFormatter to produce a string representation of a date, see Working With User-Visible Representations of Dates and Times. For a sample code playground, see Displaying Human-Friendly Content.

## See Also

### Converting Objects

- [date(from:)](foundation/dateformatter/date(from:).md)
- [localizedString(from:dateStyle:timeStyle:)](foundation/dateformatter/localizedstring(from:datestyle:timestyle:).md)
- [getObjectValue(_:for:range:)](foundation/dateformatter/getobjectvalue(_:for:range:).md)
