Hi Mike, I used to use the 3 dropdowns method.. (now using jquery datepicker) but used "mmm" for the month value.
Then validate something like this isDate("#day#-#month#-#year#") which evaluates to isDate("31-Feb-2009") There was no confusion between day and month this way.. Regards, Adam -----Original Message----- From: Mike Kear [mailto:afpwebwo...@gmail.com] Sent: Friday, February 20, 2009 3:56 PM To: cfaussie@googlegroups.com Subject: [cfaussie] Re: Validating dates ... what's the trick? The problem is i'm building the date from 3 dropdowns for day, month and year, so the day dropdown has 1-31 on it. Therefore it's possible to select 31/Feb/2009. Then if you try to validate the date from the form, by feeding those three values into the LSIsDate() function, or the IsValid(Date) or any other date function, first of all you have to give those functions a date object. To do that you use createdate() which chunders if you give it 31/Feb/2009 So therefore the function LSIHisDate can never be tested on an invalid date (which is its main purpose for living after all) . This same point applies to IsDate() and IsValid("eurodate", ... and IsValid("date", ... ) because they take a date object as an argument, and you can't create an invalid date object. Unless i'm missing something here, it seems that these date validation functions have no use. The way you check validity of dates is to either design the form so people can't enter invalid dates (e.g. using a date picker) and/or using try/catch around the createdate() function. Cheers Mike Kear Windsor, NSW, Australia Adobe Certified Advanced ColdFusion Developer AFP Webworks http://afpwebworks.com ColdFusion, PHP, ASP, ASP.NET hosting from AUD$15/month On Fri, Feb 20, 2009 at 3:46 PM, Chris Velevitch <chris.velevi...@gmail.com> wrote: > > Did you try the LSIsDate function? > > > Chris > -- > Chris Velevitch > Manager - Adobe Platform Users Group, Sydney > m: 0415 469 095 > www.apugs.org.au > > Adobe Platform Users Group, Sydney > Feb '09 meeting: Hands On Cairngorm Basics > Date: Mon 23rd Feb 6pm for 6:30 start > Details and RSVP on http://groups.adobe.com/posts/d094878396 > > > > -- --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "cfaussie" group. To post to this group, send email to cfaussie@googlegroups.com To unsubscribe from this group, send email to cfaussie+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cfaussie?hl=en -~----------~----~----~----~------~----~------~--~---