Use datediff
<cfif datediff("d", form.dateofsend, dateformat(now(),"mm/dd/yyyy") NEQ
0>
<cflocation .....
<cfelse>
Do other stuff.
</cfif>
That will check date difference by the Day, if it's not 0, which would
be todays date, then it returns false.
______________________
steve oliver
cresco technologies, inc.
http://www.crescotech.com
-----Original Message-----
From: Mark Leder [mailto:[EMAIL PROTECTED]]
Sent: Sunday, January 20, 2002 9:11 PM
To: CF-Talk
Subject: Conditional Statement based on Date
I have a form field defaulted to Today's date (as mm/dd/yyyy). The user
can change it to some future date, if they so wish.
On my processing page, I need to run a statement which, if the date from
the form is not today's date, then a different template is displayed.
The code below I what I'm using now, but I get an error that CF can't
determine the value of todayDate = DateValue(Now()). How do I write the
correct syntax?
---------------
<cfset todayDate = DateValue(Now())
<cfif not todayDate(form.dateofsend)>
<CFLOCATION URL="e_main.cfm" ADDTOKEN="No">
<cfelse>
... Other logic
</cfif>
---------------
Thanks in advance for your help.
Mark
______________________________________________________________________
Dedicated Windows 2000 Server
PIII 800 / 256 MB RAM / 40 GB HD / 20 GB MO/XFER
Instant Activation � $99/Month � Free Setup
http://www.pennyhost.com/redirect.cfm?adcode=coldfusiona
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists