+++
# -----------------------------------------------------------------------
# Do not edit this file. It is automatically generated by API Documenter.
# -----------------------------------------------------------------------
title = "dateTimeFormatTimeAgo"
keywords = ["grafana","documentation","sdk","@grafana/data"]
type = "docs"
+++

## dateTimeFormatTimeAgo variable

### dateTimeFormatTimeAgo variable

Helper function to return elapsed time since passed date. The returned value will be formatted in a human readable format e.g. 4 years ago. If no options are supplied, then default values are used. For more details, see [DateTimeOptions](./data/datetimeoptions.md)<!-- -->.

<b>Signature</b>

```typescript
dateTimeFormatTimeAgo: DateTimeFormatter
```
<b>Import</b>

```typescript
import { dateTimeFormatTimeAgo } from '@grafana/data';
```
