cgm225 Posted March 17, 2008 Share Posted March 17, 2008 I have a MySQL table with entries/rows with a TIMESTAMP column that contains date and time information in the following format, for example: 2008-03-16 22:27:03 I want to create a MySQL query that will return all entries with a timestamp from within the last thirty days. Any ideas? Thank you all in advance! Link to comment https://forums.phpfreaks.com/topic/96479-mysql-query-returning-all-entires-within-the-last-30-days/ Share on other sites More sharing options...
teng84 Posted March 17, 2008 Share Posted March 17, 2008 you can try select fields from table where datediff(now(),youredatehere)>=30 Link to comment https://forums.phpfreaks.com/topic/96479-mysql-query-returning-all-entires-within-the-last-30-days/#findComment-493794 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.