lewisa Posted January 11, 2010 Share Posted January 11, 2010 I need to select dates based on the day of the week for a range. Example: All Wednesdays between 01/17/2010 - 05/20/2010 What is the best way to do this? Thanks! Link to comment https://forums.phpfreaks.com/topic/188072-date-range/ Share on other sites More sharing options...
Psycho Posted January 11, 2010 Share Posted January 11, 2010 I'd find the first wednesday on or after the begin date, then create a while loop increasing the date by 7 days until it is greater than the end date. Link to comment https://forums.phpfreaks.com/topic/188072-date-range/#findComment-992908 Share on other sites More sharing options...
PHP Monkeh Posted January 11, 2010 Share Posted January 11, 2010 @OP: is this just in a general array or is this going to be part of a MySQL query? Link to comment https://forums.phpfreaks.com/topic/188072-date-range/#findComment-992929 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.