I need to find the 14days from today, but I need the format as [yyyy-MM-dd]
def laterday = new Date() + 14
message.setProperty("laterday",laterday.format("yyyy-MM-dd"))
I'm doing the validation as below
xmlData.Emp.findAll{
(Date.parse("yyyy-MM-dd",it.startDate.text().substring(0,10))) < (Date.parse("yyyy-MM-dd",laterday))
}.each{
it.replaceNode{}
}
**
Getting below error:
No signature of method: static java.util.Date.parse() is applicable for argument types: (java.lang.String, java.util.Date) values: [yyyy-MM-dd, Sat Sep 26 06:02:18 UTC 2020] Possible solutions: parse(java.lang.String), parse(java.lang.String, java.lang.String), parse(java.lang.String, java.lang.String, java.util.TimeZone), wait(), clone(), grep()
I need to change the date format to [2020-09-26]
, can someone help on this.?