I need to get list of previous dates from current date For example today date is 9.7.2022 i need to get 10 dates like 8.9.2022 7.9.2022 6.9.2022 etc I have tried with JSR223 sampler with some available code in the internet but not worked for me
I need to get list of previous dates from current date For example today date is 9.7.2022 i need to get 10 dates like 8.9.2022 7.9.2022 6.9.2022 etc I have tried with JSR223 sampler with some available code in the internet but not worked for me
Copying and pasting code without understanding what it's doing is not the best way to proceed, however if you prefer:
1.upto(10, {
log.info((new Date() - it).format('M.d.yyyy'))
})
More information:
Also be aware of JMeter's built-in __timeShift() function