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
|
|||
|
|||
Adding Up Hours
I need to track the number of hours a student accumulates
while taking various courses. These hours will then need to be added, by query, to produce a total number of hours. My problem is that I can't use a number field because then I'll get results like 6:53 + 1:27 = 7:80 and not 8:20. How do I get access to recognize that anything over 60 minutes needs to be added to the hours? I've tried changing the format of a date/time field to h:nn but that doesn't work either. Thanks. |
#2
|
|||
|
|||
Adding Up Hours
Just remember that formatting is window dressing, the
underlying data does not change. One approach would be to convert all your hours and minutes to minutes, add them up and then display them as hours and minutes using the INT and MOD operators The final conversion would look something like cstr(int([TotMins]\60)) & ":" & format$([TotMins] MOD 60,"00") -----Original Message----- I need to track the number of hours a student accumulates while taking various courses. These hours will then need to be added, by query, to produce a total number of hours. My problem is that I can't use a number field because then I'll get results like 6:53 + 1:27 = 7:80 and not 8:20. How do I get access to recognize that anything over 60 minutes needs to be added to the hours? I've tried changing the format of a date/time field to h:nn but that doesn't work either. Thanks. . |
#3
|
|||
|
|||
Adding Up Hours
Thanks Chris - I'll give this a shot.
-----Original Message----- Just remember that formatting is window dressing, the underlying data does not change. One approach would be to convert all your hours and minutes to minutes, add them up and then display them as hours and minutes using the INT and MOD operators The final conversion would look something like cstr(int([TotMins]\60)) & ":" & format$([TotMins] MOD 60,"00") -----Original Message----- I need to track the number of hours a student accumulates while taking various courses. These hours will then need to be added, by query, to produce a total number of hours. My problem is that I can't use a number field because then I'll get results like 6:53 + 1:27 = 7:80 and not 8:20. How do I get access to recognize that anything over 60 minutes needs to be added to the hours? I've tried changing the format of a date/time field to h:nn but that doesn't work either. Thanks. . . |
Thread Tools | |
Display Modes | |
|
|