Both time fields need to include the data. That is why you get the -6.
--
Dave Hargis, Microsoft Access MVP
:
Sorry but I have tried again and it is still showing me -6
Query entry is this SLA: DateDiff("n",[TIME],[TIME RTND])
This calculates the minutes.
Report Text Box is : =[SLA]\60 & Format([SLA] Mod 60,"\:00"
However the fields I have and the entries in them are as follows:
Date Recd Time Date Retnd Time Retnd
15/10/07 18:00 16/10/07 12:00 Answer I get is -6:00
:
I tried to duplicate your -6 results, but I get 18 hours using your
calculation, which is correct. Perhaps the error is where it is calculating
in the report.
I don't know how the other fields would be involved in this.
--
Dave Hargis, Microsoft Access MVP
:
Hi
Thanks for helping me.
The calculation is in the query which is SLA: DateDiff("n",[TIME],[TIME RTND])
The Report translates the minutes into hours and minutes no problem.
However, I suspect I have to take into consideration the Date Received and
Date Returned fields somehow.
:
As Time Taken is a calculated value, it should not be stored in a table, but
calculated as you need it. Storing calculated values violates some basic
database design rules. It also takes longer, wastes disc space, and can
easily become incorrect.
As to your calculation problem, it is likely your calculation formula is
incorrect.
Post back with your calculation and lets see if we can improve it.
--
Dave Hargis, Microsoft Access MVP
:
Actually, I have calculated the time in Hours and minutes in a report, but if
the email is received one day at 6pm and cleared the next day at 12pm it
shows a time of -6 hours. Any ideas how I can get it to show the correct
18hrs? I have date received and date cleared fields as well as time in and
time returned.
Thanks
:
Hi
I have a table where I have staff record received time and time to process
emails. Is it possible to have Access 2003 calculate in the same table (
Form) the lapsed time?
e.g. Fields: Time in , Time complete Time taken.
Thanks in advance