I tested it on Access and it worked....
do us (and yourself) a favor and output the CalendarInfo.Date to see what
it looks like...(what format it's in)

Additionally (and this could be part of the issue depending on the db),
you're using a reserved word to identify the field in the db.  You might
want to change it to something like 'publish_date' or 'whatever_date'.


--- Brett Smith <[EMAIL PROTECTED]> wrote:
> 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


=====
------------------------------
William Thompson
Allaire Certified Consultant

"My mind is a raging torrent, flooded with rivulets of thought cascading into a 
waterfall of creative alternatives."
        - Hedley Lamar
------------------------------

__________________________________________________
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail
http://personal.mail.yahoo.com/

-------------------------------------------------------------------------
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

Reply via email to