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! Quote Link to comment 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. Quote Link to comment 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? 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.