Solved
Forum Discussion
nmrao
6 years agoCommunity Hero
Error says that String class does not have parse method.
You are omitting the time, is it expected that way?
Please refer thread to parse
https://stackoverflow.com/questions/3817862/groovy-string-to-date
You are omitting the time, is it expected that way?
Please refer thread to parse
https://stackoverflow.com/questions/3817862/groovy-string-to-date
senthkum
6 years agoContributor
Thanks Mate,
I was able to resolve the older problem. But now I have another problem. What could be the issue for the below error?
I am not able to convert string date to date format, even though I have paresd.
def Fromdate = new Date().parse("yyyy-MM-dd'T'HH:mm:ss.000+11:00", FromDate).format('yyyy-MM-dd')
def Todate = new Date().parse("yyyy-MM-dd'T'HH:mm:ss.000+11:00", ToDate).format('yyyy-MM-dd')
def intValue = Todate.minus(Fromdate) Is this the correct formate to find the datediff?
def Nofodays = intValue.toInteger()
Error: Failed to dispatch using script; java.lang.NumberFormatException: For input string: "2020-02-19"
Thanks
Senthil. M