Filter depending on date

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

Filter depending on date

Postby pkrotrollet » Fri Aug 30, 2013 4:41 am

How do I get all sessions/hands played certain dates in the month.
I want to show for example all hands played the 27th, 28th,29th, 30th, or 31th from every month.
pkrotrollet
 
Posts: 7
Joined: Fri Aug 30, 2013 4:38 am

Re: Filter depending on date

Postby pkrotrollet » Fri Aug 30, 2013 5:45 am

Alternatively: If you guys can help me how to in the session tab can create a new column with "date ie day nr X of the month" (and not year, month and date in the same column as is default)
I think I can find a solution on my own !
pkrotrollet
 
Posts: 7
Joined: Fri Aug 30, 2013 4:38 am

Re: Filter depending on date

Postby pkrotrollet » Fri Aug 30, 2013 6:23 am

What should I write in "expression" in 'configure statistics" to get "day of the month in number" instead of
holdem_hand_player_statistics.date_played ?
pkrotrollet
 
Posts: 7
Joined: Fri Aug 30, 2013 4:38 am

Re: Filter depending on date

Postby pkrotrollet » Fri Aug 30, 2013 6:59 am

Instead of Start Time under Sessions I would like to show a column with "day of month" (written in a number)
Can this really be so hard???
pkrotrollet
 
Posts: 7
Joined: Fri Aug 30, 2013 4:38 am

Re: Filter depending on date

Postby WhiteRider » Fri Aug 30, 2013 7:46 am

EDIT: Are you using PT3 or PT4?
I wrote the following for PT4 - if you want it for PT3 it should be possible in a similar way but the column doesn't exist by default.

There is a built-in column called "date_played_day" which stores the day of the month on which hands were played, and if you create a stat to display that (e.g. duplicate and edit "Date Played" to use that column instead) that will display what you want.

To filter by it you'll need to use a custom filter.
For example go to My Reports and create a new Player report, and add your new stat to it (if you wan to break the report up into rows for each day of the month).
Click the blue Filters link and select Expression Filters, and enter an expression like this:

date_played_day > 26

(To use this filter you don't need to create a stat - you only need that if you want to break up the report into separate rows.)
WhiteRider
Moderator
 
Posts: 53972
Joined: Sat Jan 19, 2008 7:06 pm
Location: UK

Re: Filter depending on date

Postby pkrotrollet » Fri Aug 30, 2013 8:15 am

Thansk!! I use PT3 - how do I create that column. Sry, im noob..
pkrotrollet
 
Posts: 7
Joined: Fri Aug 30, 2013 4:38 am

Re: Filter depending on date

Postby pkrotrollet » Fri Aug 30, 2013 10:18 am

anyone?
pkrotrollet
 
Posts: 7
Joined: Fri Aug 30, 2013 4:38 am

Re: Filter depending on date

Postby WhiteRider » Fri Aug 30, 2013 11:18 am

The simplest way will be to duplicate the column "date_played" and change the "dateextract_date" part to "dateextract_day".
Once you have that column the same things apply - check out the Tutorial: Custom Reports and Statistics for more info on using custom stats.
WhiteRider
Moderator
 
Posts: 53972
Joined: Sat Jan 19, 2008 7:06 pm
Location: UK

Re: Filter depending on date

Postby pkrotrollet » Fri Aug 30, 2013 5:26 pm

WhiteRider wrote:The simplest way will be to duplicate the column "date_played" and change the "dateextract_date" part to "dateextract_day".
Once you have that column the same things apply - check out the Tutorial: Custom Reports and Statistics for more info on using custom stats.


In what table is that column. I really cant seem to find it !
pkrotrollet
 
Posts: 7
Joined: Fri Aug 30, 2013 4:38 am

Re: Filter depending on date

Postby WhiteRider » Sat Aug 31, 2013 3:46 am

"date_played" is a Holdem Cash Player Statistics column, or the omaha/tournament equivalents.
WhiteRider
Moderator
 
Posts: 53972
Joined: Sat Jan 19, 2008 7:06 pm
Location: UK


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

Who is online

Users browsing this forum: No registered users and 16 guests

cron
highfalutin