Data hosted with ♥ by Pastebin.com - Download Raw - See Original
  1. <!--- Create the datetime using the current date and hour --->
  2. <cfset dateHour = createOdbcDatetime(DateFormat(Now(), 'yyyy-mm-dd') & " " & TimeFormat(now(), "hh") & ":00:00") />
  3. <!--- The query including cachedwithin --->
  4. <cfquery name="qry_fruit" datasource="#myDatasource#" cachedwithin="#createTimeSpan(0,1,0,0)#" dbtype="odbc">
  5.     SELECT      apples
  6.     FROM        fruitbowl
  7.     WHERE       expiryDate > <cfqueryparam cfsqltype="cf_sql_timestamp" value="#dateHour#" />
  8. </cfquery>