filter: hands played within the last hour?

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: hands played within the last hour?

Postby dmacioce » Sat Jul 24, 2010 11:52 pm

Hi,

I want to make a report that filters hands played within the last hour. I believe that I would be able to use the hodem_hand_player_statistics.date_played field, but I don't know how to work with timestamp fields in postreSQL. Can someone provide an example of the filter expression that I could use for this?

Thanks,

Dan
dmacioce
 
Posts: 32
Joined: Sat Jul 25, 2009 4:08 pm

Re: filter: hands played within the last hour?

Postby WhiteRider » Sun Jul 25, 2010 4:57 am

Something like:

holdem_hand_player_statistics.date_played > (current_date - interval '1 hour')

..should work in a filter in a custom report.

Tutorial: Custom Reports and Statistics
WhiteRider
Moderator
 
Posts: 54025
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 0 guests