Complex Date Validation using IIf and Between (1 Viewer)

ritenow

New member
Local time
Today, 05:08
Joined
Jul 31, 2002
Messages
7
I was wondering how you would go about validating whether a Date is in between 2 dates.
Say for example: I want to verify whether the Date is in between January 1 and March 30th
BUT
I don't care about the year. So I just want to know whether the date is in between January 1st and March 30th no matter the year that date is.

This would be a query using the IIf function
something to this nature
(WHICH_SEASON: IIf([Date] Between Jan 1st and March 30th, Blah, Blah)

I thank you in advance and look forward to your replies.

Please feel free to contact me with any questions or comments.

Patrick
patahn01@hotmail.com
 

antomack

Registered User.
Local time
Today, 05:08
Joined
Jan 31, 2002
Messages
215
Try

Iif(month([YourDateField]) in (1,2,3),"First Quarter","Not First Quarter")

In other words if the month is 1 - January, 2 - February or 3 - March.
 

ritenow

New member
Local time
Today, 05:08
Joined
Jul 31, 2002
Messages
7
Thank you very much

Thank you antomack!

That worked out perfectly for me...

Thanks again!
 
Last edited:

Users who are viewing this thread

Top Bottom