Got another good one.  I'm doing an IsDate() function for a cfif statement,
inside a cfloop-query.  The problem is that the cfif's will not function
properly if there are NULL's in the data.

Any suggestins would be nice...

Here is the code:

<cfloop query="qTMPPull">
        <cfif IsDate(qTMPPull.OpenDate)>
                <cfset OpenDate = createODBCDate(qTMPPull.OpenDate)>
        <cfelse>
                <cfset OpenDate = "a">
        </cfif>
        
        <cfif IsDate(qTMPPull.CloseDate)>
                <cfset CloseDate = createODBCDate(qTMPPull.CloseDate)>
        <cfelse>
                <cfset CloseDate = "not here">
        </cfif>
        
        <cfif IsDate(qTMPPull.LastBilled)>
                <cfset LastBilled = createODBCDate(qTMPPull.LastBilled)>
        <cfelse>
                <cfset LastBilled = "b">
        </cfif>
<cfoutput>#IsDate(qTMPPull.OpenDate)#-#OpenDate#-a#qTMPPull.OpenDate#-<br>
#IsDate(qTMPPull.LastBilled)#-#LastBilled#-b<br>
#IsDate(qTMPPull.CloseDate)#-#CloseDate#-here</cfoutput><cfabort>

.......
</cfloop>

THIS is what it returns:

NO--a-
NO--b
NO--here 

Any ideas????

Sincerely,

Matthew M. Eschenbaum
Allaire Certified Professional
DevTech Inc.
[EMAIL PROTECTED]
206.956.0888
www.dev-tech.com



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to