Connecting Tech Pros Worldwide Forums | Help | Site Map

Data entry of a swimmers/athlete's time

P Mitchell
Guest
 
Posts: n/a
#1: Nov 13 '05
How you set up a field to store for example, 1 min 30.23 secs for a
swimmer's time in a database table?

Peter



Allen Browne
Guest
 
Posts: n/a
#2: Nov 13 '05

re: Data entry of a swimmers/athlete's time


Best to store the value as a number of seconds, and write a function to
display it as minutes and seconds.

Because you want a fractional number, you cannot use the integer types. A
Double would work, but if you want to store the precise number of
milliseconds, a Currency field might be best. It will retain exactly 4
decimal places of precision (tenths of a milllisecond), and cope with values
as large as many years.

To display as minutes, use integer division by 60 (i.e. the \ operator.)

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"P Mitchell" <pmitchell@mail.com> wrote in message
news:42b95768_3@news.chariot.net.au...[color=blue]
> How you set up a field to store for example, 1 min 30.23 secs for a
> swimmer's time in a database table?
>
> Peter[/color]


Closed Thread