Re: Stupid Date Question

2007-06-15 Thread Andrew Scott
very true On 6/16/07, Alan Rother <[EMAIL PROTECTED]> wrote: > > Only one problem with this code > > form.Day")> > > Date Valid > > Date is invalid > > > > > If the data entered into either of the three form fields is invalid, > the CreateDate will throw an error before the IsDate can do it

Re: Stupid Date Question

2007-06-15 Thread Alan Rother
Only one problem with this code Date Valid Date is invalid If the data entered into either of the three form fields is invalid, the CreateDate will throw an error before the IsDate can do it's job. It would be better to pull this out into a try catch

Re: Stupid Date Question

2007-06-15 Thread Andrew Scott
How about. Date Valid Date is invalid On 6/16/07, Robert Harrrison <[EMAIL PROTECTED]> wrote: > > 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: > > >BAD DATE > > > Anyone see what's wr

Re: Stupid Date Question

2007-06-15 Thread Ariel Jakobovits
quotation marks and pound signs? - Original Message From: Robert Harrrison <[EMAIL PROTECTED]> To: CF-Talk Sent: Friday, June 15, 2007 1:09:32 PM 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 dat

Re: Stupid Date Question

2007-06-15 Thread Aaron Rouse
Did not test it but I think this would work: IsDate("#Form.day#/#form.Month#/#Form.Year#") May need to switch the placement of the day and the month. I personally would use a CreateDate function either within the IsDate function or on a variable that is then used in the IsDate function. On 6/1

RE: Stupid Date Question

2007-06-15 Thread Dawson, Michael
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.y