Format for Time

A

Alan Balthrop

I am creating a database for a local sports team. I need to enter box scores for when goals are scored during the 4 quarters (and overtime
periods). Each quarter is 15 minutes long, and I would need to be able to perform querries based on the times entered (such as how
short/long a time between goals, etc), and that data could also overlap quarters (ie. goals scored at 14:59 of one quarter, and another at
:35 of the second is :36 seconds apart).

Does someone have a recomendation as to how I can best set up the a time column this? I am hoping to do this without resorting to counting
seconds (3600 in each quarter, with the time converted in a second table, ie. 3600 is 15:00, 1 is :01, etc.)


Thanks in advance for any advice you can give!


Alan Balthrop
Dallas Sidekicks Historical Archive
http://www.kicksfan.com
 
T

Tim Ferguson

Does someone have a recomendation as to how I can best set up the a
time column this? I am hoping to do this without resorting to counting
seconds (3600 in each quarter, with the time converted in a second
table, ie. 3600 is 15:00, 1 is :01, etc.)

Well, yes the best way is to use a proper numeric field and decide on some
friendly unit to use. If you really want accuracy to the nearest second,
then that is probably the most sensible unit to use: on the other hand if
things only happen with 15-second precision, then using minutes (and .0,
..25 and so on) would be easy.

It is not hard to fix the user interface to make life easier. You can
easily convert a number of seconds into a text string

= GoalSeconds \ 60 & ":" & Format(GoalSeconds mod 60, "00")

in the query or the text box. Entering the value is only a little trickier,
using the BeforeUpdate event or even providing a couple of spinners. Have a
look at the MS Windows Clock adjuster for a nice way of dialling in hours
and minutes, for example.

Hope that helps


Tim F
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top