Solved
Forum Discussion
groovyguy
7 years agoChampion Level 1
You are subtracting too late. You need to subtract before you convert / format to a string. Try this:
def today = new Date() def tenDaysAgo = today - 10 log.info today.format("MM/dd/yyyy") log.info tenDaysAgo.format("MM/dd/yyyy")