Topic: hourly report Posted: 31 Oct 2011 at 10:56am
OK i have tough one
I have a report that I run every our it totals revenue made during the hours and adds it up this part is working great,
now I have been asked to include the previous weeks total by hour.
so let say it is October 31 at 4 pm my report looks like this
coin in jackpot win
100.00 2000 3000
this is the total for current day from 4am to 4pm now every hour I run it it will add the next hours to the total.
what I need to do now is the following
Oct 31 coin in jackpot win
100.00 2000 3000
Oct 24 coin in jackpot win
100.00 2000 3000
now keep in mind curent day Oct 31 is working what I need to to beable to report the number for prevous monday current time.
this is the formaul I use for curretday
date(dateadd('h',-4,{HC_PRIME_REPORTDATA.dtTime})) = dateadd('d', (if currenttime in time(0,0,0) to time(4,15,0) then -1 else 0),currentdate)
If I adjust it be adding a -7 at end of currentdate it returns the complete 24 hours from 7 days ago when all i need it to report is the total from senven days ago at the current time to compaire to todays current total.
its a very simple report in that it only uses one table. the data is tabled every 15 minutes
Gamestarts is the number of times the game has been played.Does not matter how many coins are bet.It is the number of times the handle has been pulled or the spin button has been pushed
Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Posted: 02 Nov 2011 at 4:13am
date(dateadd('h',-4,{HC_PRIME_REPORTDATA.dtTime})) = dateadd('d', (if currenttime in time(0,0,0) to time(4,15,0) then -1 else 0),currentdate)
and hour({HC_PRIME_REPORTDATA.dtTime})-1=hour(currenttime)-1
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