Connecting Tech Pros Worldwide Help | Site Map

Data entry of a swimmers/athlete's time

  #1  
Old November 13th, 2005, 12:15 PM
P Mitchell
Guest
 
Posts: n/a
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


  #2  
Old November 13th, 2005, 12:15 PM
Allen Browne
Guest
 
Posts: n/a

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