One thing you can do is simply validate the date range. What dates are acceptable? A combination of isDate() and dateCompare() will do that for you...
On Jan 24, 2008 2:05 AM, Mike Chabot <[EMAIL PROTECTED]> wrote: > You also need to watch out for exceeding the database's bounds on what > dates are allowed. 1/1/0001 might be a valid date, but the database > probably doesn't like it. > > -Mike Chabot > > On Jan 24, 2008 12:03 AM, Aaron Rouse <[EMAIL PROTECTED]> wrote: > > I force the user to us a date selector. Use a few different methods > across > > many applications. The latest one I have been using this due to the > ability > > to do times with it. > > > > http://www.zapatec.com/website/main/products/prod1/ > > > > Then I just rely on IsDate in the back end, they'd have to be rather > > adventurous to bypass the selector and I am willing to take the risk > since > > it has not bitten me in 10+ years now. > > > > On Jan 23, 2008 4:30 PM, Terry Schmitt <[EMAIL PROTECTED]> wrote: > > > > > I can't believe that I have not run up against this before with > > > isDate()... > > > I dynamically generate a form where I don't know the data type until > run > > > time. > > > My only requirement is to format any dates. > > > > > > I was doing a simple <cfif isDate(myDate)> then formatting it, until I > > > realized that this string (09-262) was formatting as a date. It > happens to > > > be a cubicle number > > > > > > I know that isDate will pretty much return TRUE on any darned thing. > > > Actually, most any date function will execute without failure on the > above > > > value. > > > > > > So the question is... > > > How are you all validating dates reliably? I've checked cflib.org for > > > something with no luck. Google doesn't return much. I'm adding a year > range > > > check to my code for now, which works, but doesn't seem too elegant. > > > > > > > > > > > > > > > > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;160198600;22374440;w Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:297283 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

