• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint

Name

IIf

Synopsis

                  IIf(condition, expression1, expression2)

Evaluates condition as Boolean. If condition is true, IIf( ) then evaluates expression1. If condition is false, IIf( ) evaluates expression2. Examples:

<cfoutput>
<b>IIF(1+2 is 3, DE("Yes"), DE("No")):</b><br>
#IIF(1+2 is 3, DE("Yes"), DE("No"))#
<p><b>IIF(DayOfWeek(Now( )) is 4, DE("Today is <b>Wednesday</b>!"), 
DE("Today is #DayOfWeekAsString(DayOfWeek(Now( )))#")):</b><br>
#IIF(DayOfWeek(Now( )) is 4, DE("Today is <b>Wednesday</b>!"),
DE("Today is #DayOfWeekAsString(DayOfWeek(Now( )))#"))#
</cfoutput>


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint