Nope, if left blank, CF tries to evaluate CreateODBCDate() and generates
an error:

Error Diagnostic Information
Parameter 1 of function CreateODBCDate which is now "" must be a date/time
value

Jim


-----Original Message-----
From: Bryan Batchelder <[EMAIL PROTECTED]>
To: '[EMAIL PROTECTED]' <[EMAIL PROTECTED]>
Date: Monday, July 10, 2000 2:25 PM
Subject: RE: IIf() and DE confusion


>This message is in MIME format. Since your mail reader does not
understand
>this format, some or all of this message may not be legible.
>
>------_=_NextPart_001_01BFEAAC.DB4262B0
>Content-Type: text/plain;
> charset="iso-8859-1"
>
>shouldn't this work?:
>
>iif(IsDate(form.thedate), DE(#CreateODBCDate(form.thedate)#), DE(""))
>
>--b
>
>p.s.  if you ever think you have it bad....here is an iif that took a few
>hours of my time and about 15 minutes of a colleagues:
>
>iif(query.red_flag[rowNbr], DE(caller.pqa & '/redflag.gif'),
>iif(query.close_flag[rowNbr], ""DE(iif(query.won_flag[rowNbr],
DE(caller.pqa
>& '/thumbs_up.gif'), DE(caller.pqa & '/thumbs_down.gif')))"",
>""DE(caller.pqa & '/transpix.gif')""))
>
>Laterz.
>
>--------------------------------------------
>Bryan D. Batchelder       Work: 813-935-7100
>Palm/Internet Developer   Home: 727-547-1322
>--------------------------------------------
>ConnectWise, Inc. (www.ConnectWise.com)
>2803 West Busch Blvd, Suite 204
>Tampa, FL 33618
>--------------------------------------------
>
>-----Original Message-----
>From: Jim McAtee [mailto:[EMAIL PROTECTED]]
>Sent: Monday, July 10, 2000 4:15 PM
>To: [EMAIL PROTECTED]
>Subject: IIf() and DE confusion
>
>
>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/[email protected]/
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