Yep this is because SQL and CF don't see dates the same...it's a
nightmare.....use a varchar string in the format dd/mm/yyyy as the variable
and set dateformat dmy beforehand as I suggested in my last post

------------------------------------------------------------------ 
Andrew Ewings
Project Manager
Thoughtbubble Ltd 
http://www.thoughtbubble.net 
------------------------------------------------------------------ 
United Kingdom 
http://www.thoughtbubble.co.uk/ 
Tel: +44 (0) 20 7387 8890 
------------------------------------------------------------------ 
New Zealand 
http://www.thoughtbubble.co.nz/ 
Tel: +64 (0) 9 488 9131 
------------------------------------------------------------------ 
The information in this email and in any attachments is confidential and
intended solely for the attention and use of the named addressee(s). Any
views or opinions presented are solely those of the author and do not
necessarily represent those of Thoughtbubble. This information may be
subject to legal, professional or other privilege and further distribution
of it is strictly prohibited without our authority. If you are not the
intended recipient, you are not authorised to disclose, copy, distribute, or
retain this message. Please notify us on +44 (0)207 387 8890.



-----Original Message-----
From: list@objekt [mailto:[EMAIL PROTECTED]]
Sent: 02 October 2001 13:53
To: CF-Talk
Subject: Re: where date = day problem


Hi,

I am not getting an error.

just no results!

even if i enter a date directly into the statement.

thanks
chad


> Chad,
>
> What's the error that you're getting and where???
>
> Regards
>
> Stephen
>
> > -----Original Message-----
> > From: list@objekt [mailto:[EMAIL PROTECTED]]
> > Sent: 02 October 2001 13:29
> > To: CF-Talk
> > Subject: where date = day problem
> >
> >
> > hi everyone....
> >
> > I am trying to do a query that will just show me events for a chosen
day.
> >
> > i have an output like this...
> >
> > <cfoutput query="days">
> > <CFSET yourDate = CreateDate(years, months, days)>
> >  <a href="index.cfm?showDate=#URLEncodedFormat(yourDate)#">
> > #DateFormat(yourDate, "dd/mmm [dddd]")#
> > </a>
> >  </cfoutput>
> >
> > which gives me a urlencoded date format
> >
> > I then want to pass this to a query to show all events for that day.
> >
> > <cfquery name="events" datasource="#DSN#" dbtype="ODBC">
> > SELECT *
> > FROM events
> > WHERE eventdatestart = #createODBCdate(showdate)#
> > ORDER BY eventdateStart
> > </cfquery>
> >
> > I am not getting an error, but no results are being returned.
> > I have tried also tried '#createODBCdate(showdate)#' (with single
quotes)
> >
> > this should be so simple but i cant get results!?
> >
> > any help is appreciated.
> >
> > thanks
> > chad
> >
> >
> >
> >
> >
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm
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

Reply via email to