rashmi_k28 Posted July 29, 2008 Share Posted July 29, 2008 How to find the records from current time to the 1 day interval excluding the seconds of the timestamp Quote Link to comment Share on other sites More sharing options...
paul2463 Posted July 29, 2008 Share Posted July 29, 2008 have alook <A HREF="http://dev.mysql.com/doc/refman/5.0/en/date-and-time-functions.html"> Here at the MYSql Manual</A> SELECT something FROM tbl_name WHERE date_column = DATE_SUB(CURDATE(),INTERVAL 1 DAY) Quote Link to comment Share on other sites More sharing options...
rashmi_k28 Posted July 29, 2008 Author Share Posted July 29, 2008 select timestamp, ifnull(avg(100 - pkt),-1) from tablename where timestamp <= ('".$time."') and timestamp >= date_sub('".$time."',interval 1 day) group by timestamp; But I should include minutes and hour along with date. Now i am using the query like this Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.