Using this data ---
Client DOI Client DOT
08/04/2007
09/01/2007 09/15/2007
09/01/2007
08/04/2007 10/03/2007
with this query ---
SELECT krc547.[Client DOI], krc547.[Client DOT], DateDiff("d",IIf([Client
DOI]<[Enter month and year 09/01/2007],[Enter month and year
09/01/2007],[Client DOI]),IIf([Client DOT] Is Null,DateAdd("m",1,[Enter month
and year 09/01/2007])-1,IIf([Client DOT]>DateAdd("m",1,[Enter month and year
09/01/2007])-1,DateAdd("m",1,[Enter month and year 09/01/2007])-1,[Client
DOT])))+1 AS Expr1
FROM krc547;
this results ---
Client DOI Client DOT Expr1
08/04/2007 30
09/01/2007 09/15/2007 15
09/01/2007 30
08/04/2007 10/03/2007 30
--
KARL DEWEY
Build a little - Test a little
krc547 said:
That works to count the number of days from DOI to 9/30/07, but it still does
not count the number of days between DOT (termination date) and DOI.
:
My second question,
I have the following statement and it counts the days correctly if there is
an intake but it does not count the days correctly if there is a termination:
Days: IIf([Client DOT]<#9/30/2007#,[Client DOT],#9/30/2007#)-[Client DOI]
use DateDiff("d",#9/30/2007#,[Client DOI])