## formatDateTime() function

Formats a FHIR dateTime string as a human readable string. Handles missing values and invalid dates.

**Signature:**

```typescript
export declare function formatDateTime(dateTime: string | undefined, locales?: Intl.LocalesArgument, options?: Intl.DateTimeFormatOptions): string;
```

## Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| dateTime | string \| undefined | The dateTime to format. |
| locales | Intl.LocalesArgument | _(Optional)_ Optional locales. |
| options | Intl.DateTimeFormatOptions | _(Optional)_ Optional dateTime format options. |

**Returns:**

string

The formatted dateTime string.

- [formatDateTime() function](/content/docs/sdk/core.formatdatetime#formatdatetime-function/index.html)
- [Parameters](/content/docs/sdk/core.formatdatetime#parameters/index.html)
