Change time format variable
With an xpath query I put a time in a variable depature_time (5:49)
I want to use this in another request.
The problem is it has to be 05:49. So how do I add a zero but only when the hour is a single digit.
I cannot get to work with a BeanShell PreProcessor.
I'm also not a very good programmer so can you give an example of code I can use?
Re: Change time format variable
A quickly patch to solve your problem:
* Add an IF logic controller as parent for the request with the condition:
* Then in the child request you can try with the parameter value:
So, if your variable time is "5:49", jmeter send the value "05:49"
Remember, this is a quickly solution.
I hope it helps.