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!

(Groovy Expression) Get the no. of days between two dates

Neeraj SehgalApr 7 2009 — edited Apr 7 2009
Hi All,

I am using ADF-BC-11g to create an entity object with 2 specific columns ActualDate and EstimatedDate both of Date type. I also want an additional field DaysBetweenTwoDates showing the difference between these two dates. Hence, I add another attribute DaysBetweenTwoDates in my entity object and after removing the Persistent property, I modify the expression field as ActualDate - EstimatedDate. When I test my AM, I get an error as below:

*(oracle.jbo.JboException) JBO-29000: Unexpected exception caught: groovy.lang.MissingMethodException, msg=No signature of method: java.sql.Date.minus() is applicable for argument types: (java.sql.Date) values: {2009-04-01}*

Can anyone please tell me how to achieve the same?

Please note that I can not add a new column DaysBetweenTwoDates in the table nor can I have a new VO attribute subtracting and storing the difference as there are some logical and refreshing constraints.

Any suggestions would be really helpful.

Thanks
Neeraj
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 5 2009
Added on Apr 7 2009
3 comments
1,089 views