At 02:37 PM 7/24/2001 -0400, you wrote:
>I have a query that returns a field that is either a date or N/A or No or
>Now.  I want it to output the words if there is words and if there isnt then
>do a dateformat on the date.  How can I do this?

For one record:

<cfif IsDate(#fieldname#)>
         <cfset fieldname[1] = DateFormat( ... )>
</cfif>

<cfoutput>#fieldname#</cfoutput>

For more than one record:

<cfoutput>
<cfloop query="queryname" index="i">
         <cfif IsDate(#fieldname[i]#)>
                 <cfset fieldname[i] = DateFormat( ... )>
         </cfif>
         #fieldname[i]#
</cfloop>
</cfoutput>

Now available in a San Francisco Bay Area near you!
http://63.74.114.11/mr_urc/index.cfm
http://63.74.114.11/mr_urc/resume.cfm


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to