You may also want do this processing in the query with a case statement
checking if ISDATE(yourDateColumn). ISDATE returns 1 if the input expression
is a valid date; otherwise, it returns 0. (double check syntax in SQL
Server)
something like:
SELECT mycols, newdate =
CASE ISDATE(mydate)
WHEN 1 THEN 'DATEPART(m,mydate)' + '/' + 'DATEPART(d,mydate)' + '/' +
'DATEPART(yyyy,mydate)'
ELSE mydate
Then you just output the column using CF....
don't know what's best for your situation...
Orlando
-----Original Message-----
From: Joshua Tipton [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, July 24, 2001 1:38 PM
To: CF-Talk
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