how to add hours

uhm. ok let say, i have a report, that report has a hours per day field, that hours per day is calculated through the function calchoursperday,

now at the bottom of the report, or anywhere for that matter, i want to be able to "sum" up the hours per day.

i used this expression: =sum(val([daily hrs]))

but to my misfortune, it only computes the hours and exludes the minutes. my calculated hours per day is formatted this way: 01:00. (hours:minutes)

so how do i fix my expression to include the minutes in the addition?
 
Try this:

=sum(TimeValue([daily hrs]))

Or

=sum(CDate([daily hrs]))
 
2.7916666666667 < - got this as opposed to 62 hrs. @_@
 
I was bit dosy giving you CDate().

=Sum(Hours([daily hrs])) + Sum(Minutes([daily hrs]))/60

I'm not entirely sure what you want, but try the above.
 
not working, saying unidentified expression @_@ waaaa my last problem with my db i cannot figure it out!! am loosing my mind.
 
Post your db and I'll sort it out. Zip, Upload and Reply.
 
here it is. help me :d lols i almost got it right with yours, it was 63.nnnn hours. lols haha. :d

i counted the hours it was 64 :D
 
I thought you said it was unidentified?

63.what exactly?
 
actually it was off, the hours was actually 67, lol sorry, i got so excited i got it right.
 
1. Compact & Repair.
2. Zip
3. Upload and wait for the file to appear on the dialog window
4 Close the small Manage Attachments window
5. Reply
 
here it is. help me :d lols i almost got it right with yours, it was 63.nnnn hours. lols haha. :d

i counted the hours it was 64 hehe lols.
 
i still cant upload lols. its only 2mb, man this is not my lucky day
 
I don't think you're doing it correctly. Did you zip it? Did it come up with any error?

What version of Access are you using?
 
says db upload failed. T_T anyway, the formula you gave it, it computes the hours right, but not the minutes. man. i am so lost right now.
 
You're probably adding up incorrectly. Give me 5 time figures and tell me the total hours?

I will also try it with the function.
 
If you calculate everything in MINUTES and then to display you use

Minutes/60 & ":" & Minutes Mod 60

(pseudo code)
 
got it posted in the right one :d yay.

so what should i do? how will i add it correctly?
 

Users who are viewing this thread

Back
Top Bottom