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.
Robert B. Harrison
Director
) 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
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
quotation marks and pound signs?
- Original Message
From: Robert Harrrison [EMAIL PROTECTED]
To: CF-Talk cf-talk@houseoffusion.com
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
How about.
cfif isDefined(form.Year) and isDefined(form.Month) and isDefined(
form.Day)
cfif IsDate(CreateDate(form.year,form.month,form.day))
Date Valid
cfelse
Date is invalid
/cfif
/cfif
On 6/16/07, Robert Harrrison [EMAIL PROTECTED] wrote:
I validate dates all the time, but in
Only one problem with this code
cfif isDefined(form.Year) and isDefined(form.Month) and isDefined(
form.Day)
cfif IsDate(CreateDate(form.year,form.month,form.day))
Date Valid
cfelse
Date is invalid
/cfif
/cfif
If the data entered into either of the three form fields is invalid,
the
very true
On 6/16/07, Alan Rother [EMAIL PROTECTED] wrote:
Only one problem with this code
cfif isDefined(form.Year) and isDefined(form.Month) and isDefined(
form.Day)
cfif IsDate(CreateDate(form.year,form.month,form.day))
Date Valid
cfelse
Date is invalid
/cfif
/cfif
If the data
7 matches
Mail list logo