Skip to Main Content

Java Development Tools

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How to get days , months , years between two dates with groovy

user611775Jun 25 2012 — edited Jun 25 2012
I've a table that contains Start Date and End Date and I want to get the difference between then in this format 2 days , 1 moth , 1year
Can I make this with Groovy
I've added a transient attribute to a view object and make its value return (EndDate) - (StartDate); but this returns the difference of days like 200 day
I want it in this format 2 days , 1 moth , 1year
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 23 2012
Added on Jun 25 2012
2 comments
959 views