samona Posted June 5, 2008 Share Posted June 5, 2008 Is there a way to get the previous weekday using a MySql statement? For example, if it is Monday, then the previous weekday would be Friday. Quote Link to comment https://forums.phpfreaks.com/topic/108865-previous-weekday/ Share on other sites More sharing options...
Barand Posted June 5, 2008 Share Posted June 5, 2008 You could use a CASE statement Quote Link to comment https://forums.phpfreaks.com/topic/108865-previous-weekday/#findComment-558515 Share on other sites More sharing options...
fenway Posted June 5, 2008 Share Posted June 5, 2008 It's quite easy if you check DAYOFWEEK() [1..7, starts of Sunday]. Quote Link to comment https://forums.phpfreaks.com/topic/108865-previous-weekday/#findComment-558780 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.