1.2k questions

1.4k answers

361 comments

339 users

Categories

Sidebar
0 votes
844 views
by michael-h-5027 (14.8k points)

2 Answers

+1 vote

You can use the java DateUtils to add or subtract days or hours or minutes as needed. Below I'm subtracting 7 days from todays date. You can change the "-7" to whatever number of days you would like to add or subtract.

var DateUtils = org.apache.commons.lang.time.DateUtils;

var oldDate = DateUtils.addDays(qie.deduceDate(qie.getSystemDate()), -7);

var formattedOldDate = qie.formatDate('MM-dd-yyyy', oldDate  );

by michael-h-5027 (14.8k points)
edited by jon-t-7005
0 votes
You can also do this by following the evaluate template approach on this question: https://www.qvera.com/kb/index.php/2468
by ben-s-7515 (13.0k points)
...