Sorry, missed the use in the wrap. The code would actually be:
<CFSET thedate=IIF(IsDate(form.thedate), 'CreateODBCDate(form.thedate)',
'''NULL''')>
or
<CFSET thedate=IIF(IsDate(form.thedate), 'CreateODBCDate(form.thedate)',
DE('NULL'))>
<CFSET thedate=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.
>
----------------------------------------------------------------------------
--
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.
------------------------------------------------------------------------------
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.