>- see footer for list info -<
same sort of problem as you were having yesterday i think.  i'd bet it's 
looking for events between 31st Oct and 11th January, instead of 1st Nov.  
Stick in an event *before* 31st Oct and see if it gets returned.  You could try 
something like
WHERE (tblevent.StartDateTime BETWEEN #CreateODBCDateTime(StartDate)# AND 
#CreateODBCDateTime(EndDateTime)#) to see if that corrects it.

Duncan Cumming
New Media Developer
Customer Relations Management / Education
Fife Council
700 4105 / 01592 414105

>>> [EMAIL PROTECTED] 21/10/2005 14:09 >>>
>- see footer for list info -<
I know I should have used ODBC dates for evrything etc etc ... but can 
anyone explain this one to me please ...

I have a query ....

<!--- Query the events for this month. --->
<cfquery name="GetEvents" datasource="#application.CalendarDSN#">
SELECT tblEvent.EventIDPK,
tblEvent.EventName,
tblEvent.StartDateTime,
Day(tblEvent.StartDateTime) AS EventStartDay,
Day(tblEvent.EndDateTime) AS EventEndDay,
tblEvent.EndDateTime,
tblEventType_Ref.EventTypeColor,
tblEventType_Ref.EventType
FROM tblEvent
INNER JOIN tblEventType_Ref ON tblEvent.EventTypeIDFK = 
tblEventType_Ref.EventTypeIDPK
WHERE (tblevent.StartDateTime BETWEEN #StartDate# AND #EndDateTime#)

<!---
OR EndDateTime BETWEEN #StartDate# AND #EndDateTime#
OR #StartDate# BETWEEN StartDate AND EndDateTime)
--->

<cfif IsDefined("URL.EventTypeID") AND IsNumeric(URL.EventTypeID)>
AND EventTypeIDFK = #URL.EventTypeID#
</cfif>
ORDER BY StartDateTime
</cfquery>

Now this should return all the events in a particular month. which works 
fine until an event spans across 2 months

The dates are stored in a MSSQL table in the datetime format

for example 31/10/2005 07:00:00  01/11/2005 23:59:59


So if I run this query on the SQL server in query analyzer (obviuosly 
substituting the variables for typed dates & times) then it works.

If I run the same thing in the CFQUERY  then it doesn't return anythig ...

I just can't get my head around this one ...

Regards - Paul


_______________________________________________

For details on ALL mailing lists and for joining or leaving lists, go to 
http://list.cfdeveloper.co.uk/mailman/listinfo 

--
CFDeveloper Sponsors:-
>- Hosting provided by www.cfmxhosting.co.uk -<
>- Forum provided by www.fusetalk.com -<
>- DHTML Menus provided by www.APYCOM.com -<
>- Lists hosted by www.Gradwell.com -<
>- CFdeveloper is run by Russ Michaels, feel free to volunteer your help -<


**********************************************************************
This email and any files transmitted with it are confidential and intended 
solely for the use of the individual or entity to whom they are addressed and 
should not be disclosed to any other party. 
If you have received this email in error please notify your system manager and 
the sender of this message.

This email message has been swept for the presence of computer viruses but no 
guarantee is given that this e-mail message and any attachments are free from 
viruses.

Fife Council
Tel: +44 (0) 1592 414141
**********************************************************************
_______________________________________________

For details on ALL mailing lists and for joining or leaving lists, go to 
http://list.cfdeveloper.co.uk/mailman/listinfo

--
CFDeveloper Sponsors:-
>- Hosting provided by www.cfmxhosting.co.uk -<
>- Forum provided by www.fusetalk.com -<
>- DHTML Menus provided by www.APYCOM.com -<
>- Lists hosted by www.Gradwell.com -<
>- CFdeveloper is run by Russ Michaels, feel free to volunteer your help -<

Reply via email to