Calculating the Difference Between two Dates

Hi, I need to show the delay days between an Order being raised and shipped. So for example, an order is raised 01/01/06 and shipped 10/01/06 that is a 9 day delay but how do I code this so the syntax is correct. i.e DelayDays = Shipment Date - Order Date. Once I know the value of DelayDays I can then produce a report that shows all orders where it took more than 5 days from order to shipment Thanks

Declare the DelayDays variable as an integer and you should be fine with that syntax.

Thanks Daniel, works fine. I didn’t realise it was that straight forward, I was looking at other reports for an idea of what was required but just found CALCDATE which I thought I would have to use. Thanks again…Paul [:D]

Cool, glad you got it to work :). Just so you know: CALCDATE accepts a reference date and a date formula, and it returns another date. The C/SIDE reference guide in Navision Help has some good information about it.