Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Calculate per 15 minutes

Status
Not open for further replies.

Flupke

Programmer
Jun 26, 2002
94
0
0
BE
I use a formula to calculate sales per half hour. It goes like this:

time(hour({tblTV_Acties.TVAC_Tijdstip}),
(if minute({tblTV_Acties.TVAC_Tijdstip}) < 30 then
0
else
30),0)

Now I would like to calculate per 15 minutes. I tried to modify that formula, but it does not seem to work.

Any ideas on how to calculate sales per 15 minutes?

Many thanks and greetings from Brugge (Bruges - Belgium),

Michel
 
Please post your formula. The method should work.

[yinyang] Madawc Williams (East Anglia, UK). Using Windows XP & Crystal 10 [yinyang]
 
Create a formula like {@minutes}:

if minute({tblTV_Acties.TVAC_Tijdstip}) < 15 then
0 else
if minute({tblTV_Acties.TVAC_Tijdstip}) < 30 then
15 else
if minute({tblTV_Acties.TVAC_Tijdstip}) < 45 then
30 else
45

Then change your grouping formula to:

time(hour({tblTV_Acties.TVAC_Tijdstip}),{@minutes},0)

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top