Reputation: 97
I want yesterday date in my script, how to get it in JMeter scripts.
Ex ${__time(yyyy-MM-dd)}
I am using current time How to get decrease the date with previous date I tried with
${__time(yyyy-MM-dd)} - 1
But not worked
Upvotes: 1
Views: 3797
Reputation: 58862
You can use __timeShift function to get yesterday:
${__timeShift(yyyy-MM-dd,now,-P1D,yesterday)}
The timeShift function returns a date in the given format with the specified amount of seconds, minutes, hours, days or months added
This will also save value in JMeter variable yesterday
accessible later using `${yesterday}
Upvotes: 3