Difference between two Date Fields

Hi everybody , I have 2 applications which is designed by Domino 6.5.3

in both application i am calculating the time difference with following command

diffDays := (EndDate - StartDate) / 86400

end date and Start Date Field is Date/Time Type with computed when compose and Diffdays Field is Text ( computed when compose )

altough the fields are the same type , with this command

diffDays := (EndDate - StartDate) / 86400

i am having in 1 application as a value 0

but other application as value 0,78678 …etc.

If the time is 0 day .

I am checking the field which have a return value 0,7896 …from ducument properties field , and i see the Type as Text List but other one is Number List .

Even i copied the fields from the right values but the second application with copied fields , i am having a value 0,789 again .

How can i solve my problem ? Where i have to check more ?

Many thanks in Advance for your kindly help.

Subject: Difference between two Date Fields

Looks like you might have a type casting problem possibly on the 86400. What happens if you change it to:

diffDays := (EndDate - StartDate) / 86400.0

I assume the NON-zero answer is right since you didn’t say EndDate and StartDate are the same.

Give you want the difference in days you could do:

diffDays := @Int( (EndDate - StartDate) / 86400.0 )