Get first and last day (monday/sunday) in a date

SELECT DATE_ADD(CURRENT_DATE, INTERVAL(2-DAYOFWEEK(CURRENT_DATE)) DAY) AS start_day, DATE_ADD(CURRENT_DATE, INTERVAL(8-DAYOFWEEK(CURRENT_DATE)) DAY) AS end_day;
SQL - Get first and last day (monday/sunday) in a date

1 Response

Whst does this means

Write a comment

You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.