If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Format Table data type for time
I want to use time in the following way. An athlete runs a time of 1minute 30
seconds and split seconds of 2/3 100th of a second for example: I want to use the time as follows 01:30.66 [This must be the way one have to input the time in a form and use it in a query. How do I format the data type to use this time in calculations. Example fastest and slowest and also sorting the times from fast to slow ect. |
#2
|
|||
|
|||
Format Table data type for time
Hi Frank,
the access date/time data type isn't really suited to display 100th of seconds, you'll have to use a separate field for it. You can display minutes and seconds in a date/time filed, but in this case I think you better store the data in 3 separate fields: 1 for the minutes, one for the seconds and 1 for the 100ths of seconds. You can use 3 numeric fields (integers) and limit their values the seconds field to 59 and the 100ths field to 99. In reports you can concatenate the numbers to one expression. -- Kind regards Noëlla "Frank" wrote: I want to use time in the following way. An athlete runs a time of 1minute 30 seconds and split seconds of 2/3 100th of a second for example: I want to use the time as follows 01:30.66 [This must be the way one have to input the time in a form and use it in a query. How do I format the data type to use this time in calculations. Example fastest and slowest and also sorting the times from fast to slow ect. |
#3
|
|||
|
|||
Format Table data type for time
On Mon, 20 Apr 2009 02:02:22 -0700, Frank
wrote: I want to use time in the following way. An athlete runs a time of 1minute 30 seconds and split seconds of 2/3 100th of a second for example: I want to use the time as follows 01:30.66 [This must be the way one have to input the time in a form and use it in a query. How do I format the data type to use this time in calculations. Example fastest and slowest and also sorting the times from fast to slow ect. Access Date/Time fields don't really lend themselves to storing durations; for one thing they're limited to 1 second granularity. Rather than storing in a Date/Time field I'd suggest using a Number, Single (rather than the default long integer) number of seconds. 1:30.66 would be stored as 90.66. You can display it in n:ss.ss format using an expression like [Runtime] \ 60 & ":" & Format([Runtime] - [Runtime] \ 60, "00.00") and you can use two unbound textboxes on a form to enter minutes and seconds, with a bit of code to combine them. -- John W. Vinson [MVP] |
Thread Tools | |
Display Modes | |
|
|