How to Calculate the Difference between Two Date

Hi I have two dates Start and Close Dates How can I right a code to calculate the difference between the two dates CloseDate StartDate How many days is the CloseDate from the StartDate [8)]

Maybe this way: StartDate := 010104D; CloseDate := 310104D; MESSAGE('Days: %1', CloseDate - StartDate); // 30 Days Regards, Jörg

Or maybe: CloseDate - StartDate + 1 Regards, Viktoras

If you simply subtract one date from another, you will get the number of days in difference… Closedate-Startdate = # of days difference