dates count
yves COPPE
yvescoppe at skynet.be
Mon Nov 18 08:24:01 EST 2002
Hello,
I have a fld "dates" with a list of years sorted descending:
(the list has more than 1000 lines)
...
2002
2002
2001
1997
1997
1995
1994
...
I'd like to know how much dates per 10 years
00-10 : 75
11-20 : 58
...
...
here is my script :
on mouseUp
put fld "dates" into tDates
put the short date into toDay
convert toDay to dateItems
put item 1 of toDay into thisYear
put "0" into a
put thisYear-10 into thisYear
put empty into tResult
repeat for each line L in tDates
if L thisYear then
add "1" to a
else
put a&cr after tResult
put "1" into a
put thisYear-10 into thisYear
end if
end repeat
answer tResult
end mouseUp
but my result "tResult" is not correct
can anyone help me ???
--
Greetings.
Yves COPPE
Email : yvescoppe at skynet.be
More information about the use-livecode
mailing list