calculating Endtime-Starttime In Access

norriz

New Member
Joined
Aug 14, 2010
Messages
30
Guys,
I can really use some help.
table below:
StartDt EndDt Qty
3/2/16 10:21 AM 3/2/16 10:21 AM
I tried using formula below to get actual time:
IIf([Activity_HBC]![EndDt]-[Activity_HBC]![StartDt]<='0',0,[Activity_HBC]![EndDt]-[Activity_HBC]![StartDt])*24
The resulr results below is in negative:
StartDt EndDt Qty actual uniquekey
3/2/16 10:21 AM 3/2/16 10:21 AM 1 -0.00000000017 409026
How do i write my formula to show that if the results is zero or less, output zero.
Thanks
 

Excel Facts

What did Pito Salas invent?
Pito Salas, working for Lotus, popularized what would become to be pivot tables. It was released as Lotus Improv in 1989.
My guess is that your problem is that you are treating the first 0 as text and the next as a number: <='0',0
It cannot make this comparison without nesting other functions. Remove the single quotes and see what you get. Or are you trying to drop a zero into a text field on purpose?
 
Last edited:
Upvote 0

Forum statistics

Threads
1,221,825
Messages
6,162,165
Members
451,750
Latest member
dofrancis

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top