Between record calculations

  • Thread starter Thread starter chiwils
  • Start date Start date
C

chiwils

I have a softball scheduling base that has a table with the following fields:
Team # - Home - Away - Date - Time - DBG where DBG = days between games

The table consists of duplicate records for each game permitting the
generation of each team's schedule. With the table sorted to provide each
team's schedule, I would like to calculate the DBG. This will allow
minipulation of game dates for equatible scheduling.

There should be a way to determine the value from the DATE field of 2
different records and do the arithmatic.
 
I have a softball scheduling base that has a table with the following fields:
Team # - Home - Away - Date - Time - DBG where DBG = days between games

The table consists of duplicate records for each game permitting the
generation of each team's schedule. With the table sorted to provide each
team's schedule, I would like to calculate the DBG. This will allow
minipulation of game dates for equatible scheduling.

There should be a way to determine the value from the DATE field of 2
different records and do the arithmatic.

STOP.

DBG should *not exist in your table at all*. Your table structure needs to be
reconsidered! A game has two teams involved, so the Games table should have
fields for the HomeTeam and AwayTeam, a Gametime (a date/time field containing
both the date and time).

You can calculate DBG by using the DateDiff() function on a query joining the
games table to itself by the team id.

John W. Vinson [MVP]
 
Back
Top