Hours/Days

Forum for users that want to write their own custom queries against the PT database either via the Structured Query Language (SQL) or using the PT3 custom stats/reports interface.

Moderator: Moderators

Hours/Days

Postby FilS2BotS » Mon Sep 27, 2010 7:56 am

In the Reports "Results by DOW" in the Custom Reports" i did add the Statistic "Times"
I would like to add a Statistics that give me Times/Days Played ? TY
FilS2BotS
 
Posts: 149
Joined: Wed May 05, 2010 2:20 am

Re: Hours/Days

Postby WhiteRider » Mon Sep 27, 2010 10:47 am

"Times" isn't that kind of "time" - it's the number of times something happens (unless you have built it differently).
What you [probably] want is one of my other similar reports "[Tourney] Results by 3 hour block" or "[Tourney] Results by Hour".
Results by 3 hour block splits up your tourneys by 3 hour blocks across the whole week.
Results by hour splits it by the hour of the day that they started in. You can add the "Time Started" stat from this report into the DOW report if you like.
WhiteRider
Moderator
 
Posts: 54025
Joined: Sat Jan 19, 2008 7:06 pm
Location: UK

Re: Hours/Days

Postby FilS2BotS » Mon Sep 27, 2010 4:30 pm

I would like to do
Table Hours & Minutes / Days Played
I tried (cnt_minutes / cnt_days_played) / 60 its valid and i put it in Report Stats and it does not appear in the Report when i Run Report
I tried (cnt_minutes / 60) / cnt_days_played) too...
??? TY
FilS2BotS
 
Posts: 149
Joined: Wed May 05, 2010 2:20 am

Re: Hours/Days

Postby kraada » Mon Sep 27, 2010 5:46 pm

Did you remember to fill in the format tab of your stat? If you don't give it a title and width it won't show up in the report.
kraada
Moderator
 
Posts: 54430
Joined: Wed Mar 05, 2008 2:32 am
Location: NY

Re: Hours/Days

Postby FilS2BotS » Mon Sep 27, 2010 6:00 pm

TY kraada :mrgreen:
FilS2BotS
 
Posts: 149
Joined: Wed May 05, 2010 2:20 am

Re: Hours/Days

Postby kraada » Mon Sep 27, 2010 6:38 pm

You're welcome :)
kraada
Moderator
 
Posts: 54430
Joined: Wed Mar 05, 2008 2:32 am
Location: NY

Re: Hours/Days

Postby FilS2BotS » Mon Sep 27, 2010 6:53 pm

I made this Statistic in Holdem Tournament Tournaments

1)Columns Tab
Columns: cnt_minutes_days
Expression: (cnt_minutes / cnt_days_played) / 60
Description: The total amount of time played in hours and minutes / Days

2)Statistics Tab
a) Definition Tab
Name: Table Hours & Minutes / Days
Description: The total amount of time played in hours and minutes / Days
Value Expression: cnt_minutes_days
b) Format Tab
Title: Times/Days
Format Expression: format( '{1}:{2}{3}',
format_number( if ( cnt_minutes_days < 60, 0, (cnt_minutes_days - 30) / 60 ), 0, false, false),
if ( cnt_minutes_days MOD 60 < 10, '0', ''),
format_number(cnt_minutes_days MOD 60, 0, false, false) )

In the report it give me some 0:02 and it should be something like 3:14... I did copy your Statistic Table Hours & Minutes... I certainly do an error in the Format Expression... ???
FilS2BotS
 
Posts: 149
Joined: Wed May 05, 2010 2:20 am

Re: Hours/Days

Postby WhiteRider » Tue Sep 28, 2010 3:14 am

You don't need a new column for cnt_minutes_days, and that won't work.
Just do the calculation ((cnt_minutes / cnt_days_played) / 60) in your new stat.
WhiteRider
Moderator
 
Posts: 54025
Joined: Sat Jan 19, 2008 7:06 pm
Location: UK

Re: Hours/Days

Postby FilS2BotS » Tue Sep 28, 2010 7:34 am

I did delete the Colomns and i fixed the Stat...
Then in Format tab i did write that:
format( '{1}:{2}{3}',
format_number( if (((cnt_minutes / cnt_days_played) / 60) < 60, 0, (((cnt_minutes / cnt_days_played) / 60) - 30) / 60 ), 0, false, false),
if ( ((cnt_minutes / cnt_days_played) / 60) MOD 60 < 10, '0', ''),
format_number(((cnt_minutes / cnt_days_played) / 60) MOD 60, 0, false, false) )
I still have the same problem... I would like to be able to see the average amount of the time i play per days during the week (in your Report "Results by DOW")...
??? TY
FilS2BotS
 
Posts: 149
Joined: Wed May 05, 2010 2:20 am

Re: Hours/Days

Postby kraada » Tue Sep 28, 2010 8:59 am

I don't understand what you're trying to do with your format tab - why can you not just display (cnt_minutes / cnt_days_played) / 60?
kraada
Moderator
 
Posts: 54430
Joined: Wed Mar 05, 2008 2:32 am
Location: NY

Next

Return to Custom Stats, Reports, and SQL [Read Only]

Who is online

Users browsing this forum: No registered users and 0 guests