Skip to content

__dateTimeConvert

JMeter __dateTimeConvert function reference: syntax, parameters, and practical examples for parameterizing test plans with dynamic values.

Difficulty
intermediate
Guide type
reference
Estimated read time
1 min read
Last verified version
Verified JMeter 5.6

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.

NameRequiredDescription
Date StringYesThe 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 FormatNoThe original date format. If empty, the Date String field must be a epoch time.
Target Date FormatYesThe new date format
Name of variableNoThe name of the variable to set.

Example:

Terminal window
\${__dateTimeConvert(01212018,MMddyyyy,dd/MM/yyyy,)}

returns 21/01/2018

With epoch time value: 1526574881000,

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

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

On this page