Your code tells CF that Day is divided by Month is divided by Year.

Use the createDate() function first.  You can wrap a try/catch around
it.  If CF can't create a valid date from your input, then isDate() will
throw a catachable exception.

Or use isDate(form.day & "/" & form.month & "/" & form.year) to build
your date.

M!ke

-----Original Message-----
From: Robert Harrrison [mailto:[EMAIL PROTECTED] 
Sent: Friday, June 15, 2007 3:10 PM
To: CF-Talk
Subject: Stupid Date Question

I validate dates all the time, but in this case I have to combine three
separate fields and validate if the date is valid.
 
code is:
 
<cfif IsDate(form.day/form.month/form.year) is false>
    BAD DATE
</cfif>
 
Anyone see what's wrong here. It's not validating.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
ColdFusion 8 beta – Build next generation applications today.
Free beta download on Labs
http://www.adobe.com/cfusion/entitlement/index.cfm?e=labs_adobecf8_beta

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:281330
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

Reply via email to