Forum Discussion
Hi Rao,
I want to find the date difference to send my response. Should I add any .jar files to work on date format ?
If so, Can you provide the link plz.
Though the FromDate and ToDate is parsed it's still showing as string, due to that I am not able to do a datediff.
I have spent 2 days on this to resolve. Could you help me here.
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 - Fromdate
def Nofodays = intValue.toInteger()
if ((Nofodays >=8 ) || (Nofodays <= 15))
{
return "Fortnight"
}
else if ((Nofodays >=16 ) || (Nofodays <= 31))
{
return "Month"
}
Thanks
Senthil. M
- senthkum5 years agoContributor
Hi Rao,
Thanks for the update, I tried with the code you gave a made small change as per my requirement. I now do not see any error. But not able to see the data in the application. Will debug with developer and track where the issue is. Will get back to you if I face ant issues.
Thanks a lot for your support.
Thanks
Senthil. M
- nmrao5 years agoChampion Level 3Glad it helped.
Would it be possible to close other threads as well which you created for date?