I tried this code and it crashed... Does anyone see anything wrong? <cfif
DateCompare(CalendarInfo.Date, Now(), "d") gt -1>
----- Original Message -----
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, July 10, 2001 7:14 AM
Subject: Re: DateCompare
> Heya Brett! The problem is that the Now() function returns a time along
with the date. I'm assuming that the column is of Date datatype only. As a
result, Now() will always be greater than column value except at the stroke
of midnight.
>
> To get around this, add a parameter to the DateCompare function that
specifies the precision level at which you want to compare the dates. The
generic syntax is as follows:
>
> DateCompare(date1, date2 [, datePart])
>
> d- precise to the day
>
>
> For your example, the following *should* work (NOTE: I have not tested
this code):
>
> <cfif DateCompare(CalendarInfo.Date, Now(), "d") gt -1>
>
> Hope this helps!
>
> --IronFury
>
> On Mon, 09 July 2001, "Brett Smith" wrote:
>
> >
> > I am trying to get my cfif statement to do a date compare where only
future
> > dates will output. Below is the code I am currently using but if a
calendar
> > event is today it will not show. Anyone have any ideas?
> >
> > <CFOUTPUT QUERY="calendarinfo">
> >
> > <CFIF #DateCompare(CalendarInfo.Date,Now())# GT -1>
> >
> > #DateFormat(date, "mmmm D, YYYY")#
> >
> > </CFIF>
> >
> > </CFOUTPUT>
> >
> >
> >
>
> -------------------------------------------------------------------------
> > This email server is running an evaluation copy of the MailShield anti-
> > spam software. Please contact your email administrator if you have any
> > questions about this message. MailShield product info:
www.mailshield.com
> >
> > -----------------------------------------------
> > To post, send email to [EMAIL PROTECTED]
> > To subscribe / unsubscribe: http://www.dfwcfug.org
>
>
>
> -------------------------------------------------------------------------
> This email server is running an evaluation copy of the MailShield anti-
> spam software. Please contact your email administrator if you have any
> questions about this message. MailShield product info: www.mailshield.com
>
> -----------------------------------------------
> To post, send email to [EMAIL PROTECTED]
> To subscribe / unsubscribe: http://www.dfwcfug.org
-------------------------------------------------------------------------
This email server is running an evaluation copy of the MailShield anti-
spam software. Please contact your email administrator if you have any
questions about this message. MailShield product info: www.mailshield.com
-----------------------------------------------
To post, send email to [EMAIL PROTECTED]
To subscribe / unsubscribe: http://www.dfwcfug.org