Date parameter-greater of two dates

Stacey

Registered User.
Local time
Today, 14:51
Joined
Sep 10, 2002
Messages
84
I am trying to pull data based on the greater of 2 dates. One being today minus a year, the other being the date entered in the [ReceiveDate] field.

This is what I have in the criteria section for the other date field [Release_Date].

IIf((Now()-365)>[ReceiveDate],>Now()-365,>=[ReceiveDate])

It is not working. Any help would be appreciated.
 
Why not use Between keyword?

Between DateAdd("d", -365, Date()) And [Receive Date]

JR
 
I may not understand what you're suggesting. It sounds like what you suggest would give me all dates between a year ago and the ReceiveDate. Am I wrong about that?

What I'm trying to do is have the criteria be either all Release_Date(s) greater than NOW()-365 or all Release_Date(s) greater than the ReceiveDate, depending on which date (Now()-365 or ReceiveDate) is greater.
 
This purely air code but try

Where (Date()-365 > [Receive Date]=TRUE And yourfield >Date()-365) Or(Yourfield >= [Receive Date])

Brian
 
Another one to try: -

> DateAdd("yyyy", -1, Date) + Abs(DateAdd("yyyy", -1, Date) – [ReceiveDate])

Chris.
 
Figured out what I was doing wrong, here is the statement that gets the results I'm looking for

>=(IIf(Now()-365>[ReceiveDate],Now()-365,[ReceiveDate]))
 

Users who are viewing this thread

Back
Top Bottom