You want:

DATE_ADD(NOW(),INTERVAL -1440 MINUTE)

Also :

CURRENT_DATE()
CURRENT_TIME()
NOW()
CURDATE() > '2003-06-01'
CURDATE()+0 > 20030601
CURTIME() > '08:20:45'
CURTIME()+0 > 82045

Gl,
alex

-----Original Message-----
From: W Luke [mailto:[EMAIL PROTECTED] 
Sent: Sunday, June 01, 2003 7:55 AM
To: CF-Talk
Subject: Datediff query


Hi,

I used to use Access, and CreateODBCDateTime - and used the following to
grab all records created in the past day:

WHERE DATEDIFF ('n',TheDate,#CreateOdbcDatetime(DateAdd("n", -1440,
now() ) )# ) <= 1

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.

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

Sorry for all these questions.

Thanks

Will


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
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

Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. 
http://www.fusionauthority.com/ads.cfm

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

Reply via email to