IIF and Dates

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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
 
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
 
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
 
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")
 
Back
Top