Hi,
I have a list of dates and times, in a field called logDate, which are
constantly updated. I need to pull the last 2 hours worth of rows that have
been added. I think there's a specific part of time-handling that I'm
missing, because the code below doesn't pull any records at all:
<cfset twohours = #CreateODBCTime(DateAdd("h", -2, now()))#>
<Cfset nowtime = #CreateODBCTime(now())#>
<Cfquery name="getem" datasource="LBTalk">
SELECT logDate FROM stats
WHERE logDate BETWEEN #twohours# AND #nowtime#
</cfquery>
The Database is Access, and the field is set to General Date.
Any help would be appreciated
--
Will
Free Classifieds -=- www.localbounty.com
e: [EMAIL PROTECTED] icq: 31099745
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists