Query ifff statement with calculation? (1 Viewer)

MushroomKing

Registered User.
Local time
Today, 03:19
Joined
Jun 7, 2018
Messages
100
Hi everyone!

I have a small question that im unable to find the exact solution for.
It's driving me craaaaazy :D

I have a query where I want to apply this:

actualtime: IIf([daytext]="vrijdag" Or "Friday",([timediff]-48))


Now obviously its not working...but why?

If my daytext is equal to vrijdag or Friday, I want to subtract 48 from my timediff value.


Could someone help me out with this small but annoying expression?
Thanks in advance!!!
 

Gasman

Enthusiastic Amateur
Local time
Today, 10:19
Joined
Sep 21, 2011
Messages
14,038
You need True and False arguments I would have thought?

However try

Code:
IIf([daytext]="vrijdag" Or [daytext] = "Friday",([timediff]-48))
 

MushroomKing

Registered User.
Local time
Today, 03:19
Joined
Jun 7, 2018
Messages
100
Hi Gasman! Always good to see you in the thread :)

Still doesn't work for some reason. I get an #error in my field. :confused:



(sorry, will quote with code tag next time, its corrected)
 

isladogs

MVP / VIP
Local time
Today, 10:19
Joined
Jan 14, 2017
Messages
18,186
As Gasman said you also need a 'false' argument. For example

Code:
IIf([daytext]="vrijdag" Or [daytext] = "Friday",[timediff]-48, 1234)

Replace 1234 with whatever you want when daytext is neither of those values
 

Users who are viewing this thread

Top Bottom