Bar_NZ
Registered User.
- Local time
- Tomorrow, 08:06
- Joined
- Aug 14, 2012
- Messages
- 48
Hi all, please help me...
I have a form that calculates time (In Minutes) however i'm having a little trouble with one specific iif statement (Below)..
What it should do:
Place Time (KPI) 01:00
Place Time (ACT), could be any time from 22:00 - 04:00 Hours
It should process the time in minutes and give me a calculation of how late or early.
What it does:
It's all good unless I go Under 01:00 hrs
E.G KPI is 01:00, Act time is 23:30 Result -1350, should be 30
Statement:
=IIf(DateDiff("n",DateAdd("n",200,[PlaceKPI12]),DateAdd("n",200,[PlaceACT12]))*-1>120,DateDiff("n",DateAdd("n",200,[PlaceKPI12]),DateAdd("n",200,[PlaceACT12]))*-1-1440,DateDiff("n",DateAdd("n",200,[PlaceKPI12]),DateAdd("n",200,[PlaceACT12]))*-1)
Can anyone see where I'm going wrong. :banghead:
Cheers
BAR_NZ
I have a form that calculates time (In Minutes) however i'm having a little trouble with one specific iif statement (Below)..
What it should do:
Place Time (KPI) 01:00
Place Time (ACT), could be any time from 22:00 - 04:00 Hours
It should process the time in minutes and give me a calculation of how late or early.
What it does:
It's all good unless I go Under 01:00 hrs
E.G KPI is 01:00, Act time is 23:30 Result -1350, should be 30
Statement:
=IIf(DateDiff("n",DateAdd("n",200,[PlaceKPI12]),DateAdd("n",200,[PlaceACT12]))*-1>120,DateDiff("n",DateAdd("n",200,[PlaceKPI12]),DateAdd("n",200,[PlaceACT12]))*-1-1440,DateDiff("n",DateAdd("n",200,[PlaceKPI12]),DateAdd("n",200,[PlaceACT12]))*-1)
Can anyone see where I'm going wrong. :banghead:
Cheers
BAR_NZ
Last edited: