mac_gyver Posted May 17, 2013 Share Posted May 17, 2013 if you test your query you will find that date values the same as $to_data with times greater than zero on that date are not matched. the code that barand gave you using date(created) BETWEEN '$from_data' AND '$to_data' is what you should be using. Link to comment https://forums.phpfreaks.com/topic/277946-csv-export-query-with-date-range/page/2/#findComment-1430646 Share on other sites More sharing options...
83Lee83 Posted May 17, 2013 Author Share Posted May 17, 2013 if you test your query you will find that date values the same as $to_data with times greater than zero on that date are not matched. the code that barand gave you using date(created) BETWEEN '$from_data' AND '$to_data' is what you should be using. I see your point, I've removed the time aspect now. Many thanks. Link to comment https://forums.phpfreaks.com/topic/277946-csv-export-query-with-date-range/page/2/#findComment-1430648 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.