expression help (1 Viewer)

Ravi Kumar

Registered User.
Local time
Today, 15:12
Joined
Aug 22, 2019
Messages
162
hello all,

Code:
=IIf(Int([Due Date])<Int(Date())&IsEmpty(Int([Completed Date]),"Overdue")

I need to modify this to get the below result(I am not getting how to use of not null)
1. if due date is lesser than today's date or if completion date is empty then it should show overdue.
2. or if completion date is full then it should not show anything.

please help me.
 

Minty

AWF VIP
Local time
Today, 09:42
Joined
Jul 26, 2013
Messages
10,355
I would do the test for completion date first, (Air Code not tested but should work)

Code:
IIf ([Completed date] Is Not Null,"", IIf ([Due Date] < Date, "Overdue",""))
 

Gasman

Enthusiastic Amateur
Local time
Today, 09:42
Joined
Sep 21, 2011
Messages
14,050
Code:
=IIf(Int([Due Date])<Int(Date()) OR (NZ([Completed Date],0)=0),"Overdue","")

NB I saw Minty's post but thought you could still use an OR ?
 

Ravi Kumar

Registered User.
Local time
Today, 15:12
Joined
Aug 22, 2019
Messages
162
I would do the test for completion date first, (Air Code not tested but should work)

Code:
IIf ([Completed date] Is Not Null,"", IIf ([Due Date] < Date, "Overdue",""))
thank you, but #NAME? error is coming
 

Ravi Kumar

Registered User.
Local time
Today, 15:12
Joined
Aug 22, 2019
Messages
162
Code:
=IIf(Int([Due Date])<Int(Date()) OR (NZ([Completed Date],0)=0),"Overdue","")

NB I saw Minty's post but thought you could still use an OR ?
thank you, but all rows are now showing as over due , even of completed date is empty.
 

Ravi Kumar

Registered User.
Local time
Today, 15:12
Joined
Aug 22, 2019
Messages
162
is there any more details required , please tell me?
 

Gasman

Enthusiastic Amateur
Local time
Today, 09:42
Joined
Sep 21, 2011
Messages
14,050
hello all,

Code:
=IIf(Int([Due Date])<Int(Date())&IsEmpty(Int([Completed Date]),"Overdue")

I need to modify this to get the below result(I am not getting how to use of not null)
1. if due date is lesser than today's date or if completion date is empty then it should show overdue.
2. or if completion date is full then it should not show anything.

please help me.
 

Minty

AWF VIP
Local time
Today, 09:42
Joined
Jul 26, 2013
Messages
10,355
I've checked the syntax and mine is syntactically correct, do you have some sample data you could upload?
 

onur_can

Active member
Local time
Today, 02:42
Joined
Oct 4, 2015
Messages
180
it should be according to the conditions you describe.
Code:
=IIf(IsNull([Due Date])<(Date()) Or IsNull([Completed Date]);"Overdue";"")
 

Users who are viewing this thread

Top Bottom