i tried this on my database to calculate the difference between onblock and
offblock but i got "00:00: answer. I am using QUERY to calculate the time.
on my table the onblock and offblock was formated as SHORT TIME.
DateDiff("n",Format([onblock],"Short Time"),Format([offblock],"Short Time"))
Please help. . .
|
|
0
|
|
|
|
Reply
|
Utf
|
7/21/2007 10:16:00 AM |
|
Drop the Format(). The function outputs the Text type, which then has to be
converted back into Date/Time type, and there's opportunities for errors.
Just use:
DateDiff("n", [onblock], [offblock])
This might also help:
Calculating elapsed time
at:
http://allenbrowne.com/casu-13.html
--
Allen Browne - Microsoft MVP. Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.
"jor" <jor@discussions.microsoft.com> wrote in message
news:1FA41571-64FA-4693-AB84-F7103E907E84@microsoft.com...
>i tried this on my database to calculate the difference between onblock and
> offblock but i got "00:00: answer. I am using QUERY to calculate the
> time.
> on my table the onblock and offblock was formated as SHORT TIME.
>
> DateDiff("n",Format([onblock],"Short Time"),Format([offblock],"Short
> Time"))
>
> Please help. . .
|
|
0
|
|
|
|
Reply
|
Allen
|
7/21/2007 10:19:58 AM
|
|