IIF and Dates

J

JWCrosby

I need the coding for an IIF statement such that if the current date is
between January 1 and June 30 the control will show the word "Spring",
otherwise, it shows the word "Fall."

Thanks.

Jerry
 
M

Martin Schneider

JWCrosby said:
I need the coding for an IIF statement such that if the current date is
between January 1 and June 30 the control will show the word "Spring",
otherwise, it shows the word "Fall."

=iif(Date()>cDate("01.01.") Und Datum()<cDate("30.06");"Sping";"Fall")

Regards,
Martin
 
M

Martin Schneider

Martin said:
=iif(Date()>cDate("01.01.") Und Datum()<cDate("30.06");"Sping";"Fall")

Sorry, I hate the localized code concept of Access. Was supposed to be:

=iif(Date()>cDate("01.01.") and date()<cDate("30.06");"Sping";"Fall")

Regards,
Martin
 
M

Marshall Barton

JWCrosby said:
I need the coding for an IIF statement such that if the current date is
between January 1 and June 30 the control will show the word "Spring",
otherwise, it shows the word "Fall."


IIf(Month(Date()) <= 6. "Spring", "Fall")
 
Top