calculating amount of time played.

MediocreD

New member
Local time
Today, 18:59
Joined
Nov 9, 2024
Messages
4
I am currently working on a db tracking playing online poker tournaments. Part of this is tracking the overall time I play. Currently I have a session timer that I start and stop at the beginning and end of session. then a table that tracks the sessions.

I would like a more programmatic solution.

Each record has the date, start time, and length of tournament.

Since I play 20 games at once the tournaments all start and stop at different times during the sessions. So I need access to look at the first tournament in a session start time and the go the rough the lengths and start times of subsequent tournaments until it determines there no active games left when a tournament ended.

then it should take the length of the tournament and add it to the start time to get the sessions end time.

then take first start time and the calculated end time and count the minutes in between.

I have no idea how to even start doing this
 
This next is a serious question.

So now you develop some sort of log for these tournaments. What are you going to do with that information?

It's a serious question because recording data is one action but building a report or doing a statistical analysis is something else entirely. You have to lay out your goals, which START with, but do not END with, the log of tournament times. Once you know where you are going, you can lay out a plan to get there.

Understand this about Access data type Date. It is able to store date/time information. However, it can store dates without a time or times without a date. The one thing that gives trouble is storing elapsed times greater than 24 hours total. It is likely that you would have to build a specialty formatting routine if your are going to regularly encounter day-long total elapsed times. I would suggest you research that Date data type because it will be (mechanically) the easiest data type to use for your starting date/time data AND for your elapsed data.

Your problem of having parallel tournaments so that you have to find the end of a sequence of overlapping tournaments implies that you would need one more thing in your table. Your "tournament date and start time" can actually be in one variable. It is a toss-up as to which of two other values you would want to store - the duration or the end date/time. Your question about finding the LAST active tournament's end is better served if you track end date/time and, when needed, use a query to compute duration.

But let's ask this question to illustrate what ELSE you need to consider. How often do you play in multiple parallel tournaments? Will you want to be able to do this kind of analysis for tournaments once a year? Once a month? Once a week? And you know that to get good statistics, you will need a way to keep the sequences of tournament separate, because if you don't have a sequence identifier, then the next time you do a tournament sequence, your duration would extend to include the new date/time data.
 
Each record has the date, start time, and length of tournament.

Your sessions aren't explicitly declared? That's an issue if so.

If you could mark which session each tournament belongs to you could do this with just SQL (in a query). Without that you'll need VBA to iterate through all records to determine which each belongs to

Also the start date and time should be just one field. And it would be preferable to capture the end time instead of length.

Are any of those possible? Are you manually entering all data? Or are you able to extract a log file from the poker app?
 
I am currently working on a db tracking playing online poker tournaments. Part of this is tracking the overall time I play. Currently I have a session timer that I start and stop at the beginning and end of session. then a table that tracks the sessions.

I would like a more programmatic solution.

Each record has the date, start time, and length of tournament.

Since I play 20 games at once the tournaments all start and stop at different times during the sessions. So I need access to look at the first tournament in a session start time and the go the rough the lengths and start times of subsequent tournaments until it determines there no active games left when a tournament ended.

then it should take the length of the tournament and add it to the start time to get the sessions end time.

then take first start time and the calculated end time and count the minutes in between.

I have no idea how to even start doing this
It sounds like:
  1. Each Tournament has a Tournament Start Date/Time and Tournament End Date/Time
  2. Each Tournament Start Date/Time has multiple poker games that you play in
  3. Each game has a Game Start Date/Time and Game End Date/Time
So, you would need:
  1. A Tournament table with a TounamentID as a Primary Key and
    1. A TournamentBeginDate field
    2. A TournamentBeginTime field
    3. A TournamentEndDate field
    4. A TournamentEndTime field
    5. Other relevant fields as needed (Sponsor, Location, Tournament Name etc.)
  2. A Game table with a GameID as a Primary Key and TournamentID as a Foreign Key to be linked to the Tournament table and
    1. A GameBeginDate field
    2. A GameBeginTime field
    3. A GameEndDate field
    4. A GameEndTime field
    5. Other relevant fields as needed
Now for each tournament and game, it will be much easier to calculate Tournament Start and End Dates and Times and Game Start and End Dates and Times. You can use the DateDiff() function in queries and forms and reports to calculate hours and minutes spent in each tournament and the games within each tournament.

But you need to really construct your design properly and then create the relationships before anything else.
 
I expect you could create a recordset and save the earliest start time and latest finish time. When you reach a start time that is after your latest end time, that would be the end of the session.
 
Thanks for your responses...

Im not in control of the info from the poker site.

I update/import a table with a game start time field and a length of game field.

I have never had a 24 hour session

This is my issue I play on 5 different sites so I have to import that data for each...

Currently I just have a sessions table that I update manually, but I feel like there is a more efficient way to use the info I get from the sites...
 
So you would need a field to identify which site?
 
Our hands are tied since you haven’t provided the full table structure with sample data and expected results based on your specifications.
 
Thanks for your responses...

Im not in control of the info from the poker site.

I update/import a table with a game start time field and a length of game field.

I have never had a 24 hour session

This is my issue I play on 5 different sites so I have to import that data for each...

Currently I just have a sessions table that I update manually, but I feel like there is a more efficient way to use the info I get from the sites...
So does each site host multiple tournaments with each tournament having multiple games? Is a "session" a game or a tournament? The answers will drive how you consruct your tables and relationships.
 

Users who are viewing this thread

Back
Top Bottom