> Is it possible to write a query that retrieves data from the data
> source for the last hour?
>
> for Ex...
>
> <CFQUERY name="name" datasource="#ds#">
> Select * from tablename
> where fieldname = fielddata
> and createdate >= #Hour(Now())#
> and createdate <= #Hour(Now()-1)#
> </CFQUERY>
>
> or something like that. (The above query doesn't seem to work for me.)
>
> I have looked though the CF manuals, searched my email achieves
> and have been out to Allaires forms site and haven't been able to
> find anything.
OK, not knowing what database you are using;
where fieldname=fielddata
and createdate between #DateAdd("h",-1,Now())# and #Now()#
This will get CF to do the date calculation, but the Between will work for
what you want
Philip Arnold
Director
Certified ColdFusion Developer
ASP Multimedia Limited
T: +44 (0)20 8680 1133
"Websites for the real world"
**********************************************************************
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. If you have received this email in error please notify
the system manager.
**********************************************************************
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists