I have taken over a dB that stores time info in seperate field ( A list box on a form for Hours and Minutes.) . I use the below query to "convert" the seperate fields into a time value to use in reports. I am noticing that on occasion the query seems to add an hour to the total. Is there a better, cleaner way that I can do this so I can trust the return value?
Time Spent: CInt(nz(Sum([hours])*60+Sum([Minutes]),0)/60) & " hrs, " & CDbl(nz(Sum([Minutes]),0)) Mod 60 & " minutes"
Time Spent: CInt(nz(Sum([hours])*60+Sum([Minutes]),0)/60) & " hrs, " & CDbl(nz(Sum([Minutes]),0)) Mod 60 & " minutes"