+++
# -----------------------------------------------------------------------
# Do not edit this file. It is automatically generated by API Documenter.
# -----------------------------------------------------------------------
title = "parseDateMath"
keywords = ["grafana","documentation","sdk","@grafana/data"]
type = "docs"
draft = true
+++
## dateMath.parseDateMath() function
### dateMath.parseDateMath() function
Parses math part of the time string and shifts supplied time according to that math. See unit tests for examples.
Signature
```typescript
function parseDateMath(mathString: string, time: any, roundUp?: boolean): DateTime | undefined;
```
Import
```typescript
import { dateMath } from '@grafana/data';
const { parseDateMath } = dateMath;
```
Parameters
| Parameter | Type | Description |
| --- | --- | --- |
| mathString | string
| |
| time | any
| |
| roundUp | boolean
| |
Returns:
`DateTime | undefined`