JMeter __dateTimeConvert 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 __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:
\${__dateTimeConvert(01212018,MMddyyyy,dd/MM/yyyy,)}returns 21/01/2018
With epoch time value: 1526574881000,
\${__dateTimeConvert(1526574881000,,dd/MM/yyyy HH:mm,)}returns 17/05/2018 16:34 in UTC time(-Duser.timezone=GMT)