This is documentation for the next version of Grafana. For the latest stable release, go to the latest version.

API Reference@grafana/datatoDuration

toDuration variable

toDuration variable

Signature

toDuration: (input?: DurationInput | undefined, unit?: DurationUnit | undefined) => DateTimeDuration

Import

import { toDuration } from '@grafana/data';