W Luke wrote:
> 
> Now that I'm on MySQL, I don't understand how createtime() works.  The
> field (TheDate) is DATETIME, and I would need to grab all records
> created in the past 24 hours.

WHERE TheDate > <cfqueryparam cfsqltype="cf_sql_timestamp" 
value="#DateAdd("d",-1,Now())#">


> I also need similar queries, to find records submitted in the past 30
> minutes and 60 minutes.    Can anyone advise?

WHERE TheDate > <cfqueryparam cfsqltype="cf_sql_timestamp" 
value="#DateAdd("n",-30,Now())#">

WHERE TheDate > <cfqueryparam cfsqltype="cf_sql_timestamp" 
value="#DateAdd("n",-60,Now())#">

Jochem


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq

Host with the leader in ColdFusion hosting. 
Voted #1 ColdFusion host by CF Developers. 
Offering shared and dedicated hosting options. 
www.cfxhosting.com/default.cfm?redirect=10481

                                Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
                                

Reply via email to