<cfif IsDefined("your_field") AND (your_field IS NOT '')>
<cfoutput>
<cfif IsDate(your_field)>
#DateFormat(your_field,"mm/dd/yyy")#
<cfelse>
#your_field#
</cfif>
</cfouput>
<cfelse>
YOUR_FIELD DOES NOT EXIST, OR IT'S EMPTY!
</cfif>
----- Original Message -----
From: "Joshua Tipton" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Tuesday, July 24, 2001 3:34 PM
Subject: RE: date field
> This works except when the field is empty any help on that one?
>
>
> Joshua Tipton
>
> -----Original Message-----
> From: Dasher [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, July 24, 2001 3:07 PM
> To: CF-Talk
> Subject: Re: date field
>
>
> <cfoutput>
> <!-- Check to see if the field has a number in it (meaning it is a
date) -->
> <cfif VAL(your_field) NEQ 0>
> <!-- If not, just output the words -->
> #your_field#
> <cfelse>
> <!-- If it does have a number, do the dateformat -->
> #DateFormat(your_field,"mm/dd/yyy")#
> </cfif>
>
> ----- Original Message -----
> From: "Joshua Tipton" <[EMAIL PROTECTED]>
> To: "CF-Talk" <[EMAIL PROTECTED]>
> Sent: Tuesday, July 24, 2001 1:37 PM
> Subject: date field
>
>
> > 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?
> >
> > Joshua Tipton
> >
> >
> >
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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