<cfset today1 = DateAdd("d",-1,Now())>
<cfquery name="getschedule" datasource="liberty">
SELECT EVENT_ID,EVENT_DATE,EVENT_NAME,EVENT_TIME,EVENT_LOC
FROM schedule
WHERE EVENT_DATE <= #CreateODBCDate(today365)#
AND EVENT_DATE > #CreateODBCDate(today1)#
AND display='yes'
ORDER BY EVENT_DATE
</cfquery>
And of course cfqueryparam!!!!!!!
> -----Original Message-----
> From: Eric Creese [mailto:[EMAIL PROTECTED]
> Sent: vrijdag 4 juni 2004 22:29
> To: CF-Talk
> Subject: SQL date record retrevial problem
>
> I am using the following to retreive records from a database.
> However I am not gettign any records and I should. Database
> is Access but will be moving to SQL for production
>
> <cfset today365 = Now() +365>
> <cfset today1 = Now() -1>
> <cfquery name="getschedule" datasource="liberty">
> SELECT EVENT_ID,EVENT_DATE,EVENT_NAME,EVENT_TIME,EVENT_LOC
> FROM schedule
> WHERE EVENT_DATE <= #DATEFORMAT(today365, "MM/DD/YYYY")#
> AND EVENT_DATE > #DATEFORMAT(today1, "MM/DD/YYYY")#
> AND display='yes'
> ORDER BY EVENT_DATE;
> </cfquery>
>
>
>
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

