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

# __RandomDate

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

The RandomDate function returns a random date that lies between the given start date and end date values.

| Name | Required | Description |
| --- | --- | --- |
| Time format | No | Format string for DateTimeFormatter (default `yyyy-MM-dd`) |
| Start date | No | The start date, the default is *now* |
| End date | Yes | The end date |
| Locale to use for format | No | The string format of a locale. The language code must be lowercase. The country code must be uppercase. The separator must be an underscore, e.g. `en_EN`.         See [http://www.oracle.com/technetwork/java/javase/javase7locales-334809.html](http://www.oracle.com/technetwork/java/javase/javase7locales-334809.html).         If omitted, by default the function uses the Apache JMeter locale one. |
| Name of variable | No | The name of the variable to set. |

Examples:

```bash
\${__RandomDate(,,2050-07-08,,)}
```

will return a random date between *now* and `2050-07-08`. For example `2039-06-21`

```bash
\${__RandomDate(dd MM yyyy,,08 07 2050,,)}
```

will return a random date with a custom format like `04 03 2034`

## 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/)
