---
title: "__dateTimeConvert"
description: "JMeter __dateTimeConvert function reference: syntax, parameters, and practical examples for parameterizing test plans with dynamic values."
url: https://docs.jmeter.ai/functions/datetimeconvert/
lastUpdated: 2026-10-01
source: docs.jmeter.ai
---

# __dateTimeConvert

*Also documented in context in the [full Functions and Variables reference](/user-manual/functions/#__dateTimeConvert).*

The `__dateTimeConvert` function converts a date that is in source format
to a target format storing the result optionally in the variable name.

| Name | Required | Description |
| --- | --- | --- |
| Date String | Yes | The date string to convert from Source Date Format to Target Date Format. A date as a epoch time could be use here if Source Date Format is empty. |
| Source Date Format | No | The original date format. If empty, the Date String field must be a epoch time. |
| Target Date Format | Yes | The new date format |
| Name of variable | No | The name of the variable to set. |

Example:

```bash
\${__dateTimeConvert(01212018,MMddyyyy,dd/MM/yyyy,)}
```

returns `21/01/2018`

With epoch time value: 1526574881000,

```bash
\${__dateTimeConvert(1526574881000,,dd/MM/yyyy HH:mm,)}
```

returns `17/05/2018 16:34` in UTC time(-Duser.timezone=GMT)

## Related

- [Functions and Variables Guide](/topics/functions-and-variables/)
- [Regex Extractor Builder](/tools/regex-tester/)
- [Full Functions Reference](/user-manual/functions/)
- [Component Reference](/user-manual/component-reference/)
