tweetie
February 7, 2004, 12:25pm
1
I have 2 date-fields: data_01 and data_02
I have 2 calculations with: return (data_02-date_01)/86400000;
1 calculation is an integer and 1 is a number.
When I fill data_01=01-01-2004 and data_02=31-03-2004 I should a result of 90 days.
The calculation with type number gives 89,9583333333
The same calculation with type integer gives 90
Now I kinda new to this…I’m still figuring out what the difference between integer and numbers is. But I know this can’t be right
Paulo
an integer isn’t a floating point number and a number is.
So that is the difference.
And integer will be rounded.
… is er nu sprake van afrondingsproblemen bij de calculatie die een number als result geeft…zelfs onafgerond dient de berekening 90 dagen te laten zien ipv 89,9583333333
why?
are the time portions EXACTLY 12:00 or something?
if they are a bit different then you will get a float…
tweetie
February 8, 2004, 10:40am
5
The date field are filled with
01-01-2004 0:00:00.0 and
31-03-2004 0:00:00.0
just output the exact integer/long you get for the 2 dates.
then make the calculation youreself..
application.output(date.getTime())