JMeter __RandomDate function reference: syntax, parameters, and practical examples for parameterizing test plans with dynamic values.
Also documented in context in the full Functions and Variables reference.
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. If omitted, by default the function uses the Apache JMeter locale one. |
| Name of variable | No | The name of the variable to set. |
Examples:
\${__RandomDate(,,2050-07-08,,)}will return a random date between now and 2050-07-08. For example 2039-06-21
\${__RandomDate(dd MM yyyy,,08 07 2050,,)}will return a random date with a custom format like 04 03 2034