habib009pk Posted August 1, 2009 Share Posted August 1, 2009 Hi Friend I am facing a problem i have different records with same date but with different times. The feilds having datatype datetime. Now i want to delete all the records with same date only.. but when i am running this query: DELETE FROM auct_lots_full WHERE lot_date='2009-07-31'; so this query doesn't gave me any positve result.. Please Help me regarding this query Thanks And Regards Link to comment https://forums.phpfreaks.com/topic/168371-delete-query-with-respect-to-date-only/ Share on other sites More sharing options...
kickstart Posted August 1, 2009 Share Posted August 1, 2009 Hi The simple solution would be to do:- DELETE FROM auct_lots_full WHERE lot_date BETWEEN '2009-07-31 00:00:00' AND '2009-07-31 23:59:59'; All the best Keith Link to comment https://forums.phpfreaks.com/topic/168371-delete-query-with-respect-to-date-only/#findComment-888233 Share on other sites More sharing options...
gevans Posted August 1, 2009 Share Posted August 1, 2009 Or you could just pull the date from datetime DELETE FROM `auct_lots_full` WHERE DATE(`lot_date`) = '2009-07-31'; Link to comment https://forums.phpfreaks.com/topic/168371-delete-query-with-respect-to-date-only/#findComment-888341 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.