Hi Vivek, 1) If you want to do the calculation in XML (in screen widgets), I would suggest calling a java method like that:
<call-class-method class-name="org.ofbiz.base.util.UtilDateTime OR whatever class that contains the method" method-name="methodName" ret-field="resultVariable"> <field field="date1" type="java.sql.Timestamp"/> <field field="date2" type="java.sql.Timestamp"/> </call-class-method> 2) If you want to do it in ftl, just subtract the 2 dates and divide by 1000*60*60*24. Make sure the dates are both correctly formatted. Take a look at that: http://stackoverflow.com/questions/11412040/how-do-i-calculate-the-difference-in-days-between-two-iso8601-dates-with-freemar Hope that helps. Cheers, ----- Jad El Omeiri -- View this message in context: http://ofbiz.135035.n4.nabble.com/Calculate-date-difference-in-days-tp4660532p4660551.html Sent from the OFBiz - User mailing list archive at Nabble.com.