jwk811 Posted September 13, 2010 Share Posted September 13, 2010 i want to select * from table where date >= sunday whats the easiest way to get the date format for the last sunday? Quote Link to comment https://forums.phpfreaks.com/topic/213300-get-data-from-sunday-till-now/ Share on other sites More sharing options...
AbraCadaver Posted September 13, 2010 Share Posted September 13, 2010 Depends on the date format of the database column. This should give the standard mysql date format for last Sunday: $last_sunday = date('Y-m-d', strtotime('last sunday')); However, if today is Sunday then it will obviously give you the previous Sunday. Not sure if that's what you want. Quote Link to comment https://forums.phpfreaks.com/topic/213300-get-data-from-sunday-till-now/#findComment-1110586 Share on other sites More sharing options...
jwk811 Posted September 14, 2010 Author Share Posted September 14, 2010 wow "last sunday" is a perometer? and if its sunday it would need to just get todays data. but i can figure that out. thanks Quote Link to comment https://forums.phpfreaks.com/topic/213300-get-data-from-sunday-till-now/#findComment-1110792 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.