I am trying to write:
IF the StartDate is between 7/1/yy and 6/30/yy of last year AND EndDate is <> 6/30/yy of last year THEN 6/30/yy of last year as DateEnd BUT
IF the StartDate is between 7/1/yy and 6/30/yy of this year AND EndDate is <> 6/30/yy of this year THEN 6/30/yy of this year as DateEnd
This isn't correct, but working with this:
Code:
DateEnd: IIf([StartDate]>=DateSerial(Year(Date())-1,7,1) And [EndDate]<>DateSerial(Year(Date())-1,6,30),DateSerial(Year(Date())-1,6,30),IIf([StartDate]>=DateSerial(Year(Date()),7,1) And [EndDate]<>DateSerial(Year(Date()),6,30),DateSerial(Year(Date()),6,30),[EndDate]))