Good morning Allen,
Thank you a million time for you help. It works, but the minutes turn
to
negative if it greater than 190 minutes. I appreciate you value time.
DeeNguyen
:
Try the expressions on the web page in the Control Source of the text
box
on
your report.
They start with "=".
If they still error, then make sure the Name of this text box is not
the
same as the name of one of your fields. For example the calculated
text
box
cannot be named Start_Time or End_Time.
Hi,
yes, they are in Date/Time type fields, and I did it work on query,
it
turn
to minutes, and the report based on that query when I enter the
formula=Minutes.... the result is Errors. I appreciate your help.
Thank
:
Are Start_Time and End_Time fields in a table?
Are they Date/Time type fields?
Try the link: it explains how to calculate the difference in the
query.
Once you have it working there, it will be very easy to sum that
and
display
it on the report.
We have no idea what is in your HoursAndMinutes() function.
Thank you very much, but the result turn 00 when I instate "h" to
"n",
and
another it give me the diff total. Actually I have a function
name
call
HoursAndMinutes, the total just take off every 12 hours when it
count
more
than 12, look like if the total is 26 hours it will take away 12
hours
and
12
hours until it = 2hours, if less than 12 it ok
1:00
2:00
1:00
Iam ok but
8:00
8:00
9:00
the result is 1:00 and my expression is
=HoursAndMinutes(Sum([End_Time])-([Start_Time]))
Thank again for your time.
:
DateDiff("h"...) gives you whole hours only, so 0:59 counts as
zero.
Try working in minutes:
=Sum(DateDiff("n", [Start_Time], [End_Time]))
If you need to see that as hours and minutes:
=Str(Sum(DateDiff("n", [Start_Time], [End_Time])) \ 60) &
Format(Sum(DateDiff("n", [Start_Time], [End_Time])) Mod 60,
"\:00")
Explanation of how that works:
http://allenbrowne.com/casu-13.html
I'm having a problem totaling the total hours of worked in my
report
please
if you know i would appreciate your help.
my total column such as
0:15
1:20
0:30
____
and my sytax is=Sum(DateDiff("h",Start_Time,End_Time)) and it
return
to
0:00
on my report. The total column I created from query.
Thank