Jump to content

All records Within a set time period?


Mr Chris

Recommended Posts

Hello,

 

Wondering if anyone can help me with a query.

 

Basically I have a list of last_updated dates in my table

 

2009-12-06 09:40:00

2009-12-04 09:42:00

2009-12-06 09:44:00

 

And I want to say select all of these records where last_updated is not in the last 2 days from the current date and time?

 

SELECT last_updated from tbl 
WHERE
last_updated BETWEEN CURRENT_DATE
AND CURRENT_DATE - INTERVAL 2 DAY

 

Anyone help?

 

Thanks

Link to comment
https://forums.phpfreaks.com/topic/184375-all-records-within-a-set-time-period/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.