Nested IIf Headache

D

David Mulholland

I'm trying to find the later of the three date fields below using a nested
IIf statement:

DOR + 3 months
PROC + 1 day (this field may be null in some cases)
DEERS + 18 months

For some reason...I just can't seem to wrap my head around this problem. Any
guidance/help would be much appreciated. As well as 2 aspirin :)
 
M

Michel Walsh

SELECT DateAdd("m", 3, dor) AS a,
DateAdd( "d", 1, NZ(proc, 0)) AS b,
DateAdd("m", 18, deers) AS c,
SWITCH( a>=b AND a>=c, a,
b>=a AND b>=c, b,
true, c)
FROM somewhere



Vanderghast, Access MVP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top