---
title: formatDate
framework: TVMLKit JS
role: symbol
role_heading: Function
platforms: [tvOS 9.0+]
path: tvmljs/1627445-formatdate
---

# formatDate

Formats the given date into the given format.

## Declaration

```data
String formatDate(
    in Date date, 
    in String format
);
```

## Parameters

- `date`: The date value to format.
- `format`: A string that specifies the desired format. For a list of possible formats, see doc://com.apple.documentation/documentation/foundation/dateformatter.

## Return Value

Return Value A string containing the formatted date.

## See Also

### Formatting Information

- [formatDuration](tvmljs/1627346-formatduration.md)
- [formatNumber](tvmljs/1627348-formatnumber.md)
