I could have sworn I posted this thread already but I can't seem to find it. Sorry if this is a double post somehow.
I have a database which gets logged information every 5 minutes. I want to have a report that sums and displays the information every 15 minutes. So I would like information at 0,15,30,45 minutes. I wrote the if statement and it looks something like this:
if Minute({table.date}) <= 15 AND Minute({table.date}) >=5 then
15
else if Minute({table.date}) <= 30 AND Minute({table.date}) >= 20 then
30
else if Minute({table.date}) <= 45 AND Minute({table.date}) >= 35 then
45
else if Minute({table.date}) = 50 OR Minute({table.date}) = 55 OR Minute({table.date}) = 0
0
The above is what the group will be 'printed on any change of'. The number above are actually the date and time plus '15' or '30' as the minute display but it would be too long so I just put those.
I wanted to see 0,15,30,45 as the minute displays but now I'm seeing 15,30,45 and 55 as my displays. The sums are correct but the 55 is still displayed. I have a feeling this might be because 55 is the largest of 0,50 and 55 but I'm not sure? Does anyone have any suggestions?
Joined: 21 Dec 2007
Online Status: Offline
Posts: 4374
Posted: 12 Feb 2009 at 6:28am
off hand, I don't see anything wrong...or least nothing that would give a result of 55 (other than the missing then at the end of the last if), but couldn't you just remove the last if all together?
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum