Thanks, Michael.  The first two approaches work correctly, but the third
doesn't.  It throws an error as it tries to evaluate CreateODBCDate() if
the field is left blank.

Jim


-----Original Message-----
From: Michael Dinowitz <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED] <[EMAIL PROTECTED]>
Date: Monday, July 10, 2000 3:16 PM
Subject: Re: IIf() and DE confusion


>#IIF(IsDate(form.thedate), 'CreateODBCDate(form.thedate)', '''NULL''')#
>
>Note the use of single and multiple quotes here in place of DE. Using DE
>instead will look like one of these:
>
>#IIF(IsDate(form.thedate), 'CreateODBCDate(form.thedate)', DE('NULL'))#
>#IIF(IsDate(form.thedate), DE(CreateODBCDate(form.thedate)), DE('NULL'))#
>
>More information on this can be found here:
>http://www.fusionauthority.com/IIF.cfm
>
>
>> I know this can be done, but I'll be hanged if I can figure out the
right
>> combination of DE() and ## and quotes and whatever else might be
needed.
>> I'm trying to use IIf() in a SQL statement instead of the following:
>>
>> thedate = <cfif
>> IsDate(form.thedate)>#CreateODBCDate(form.thedate)#<cfelse>NULL</cfif>
>>
>> Thanks,
>> Jim


------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.

Reply via email to