SQLize Online / PHPize Online  /  SQLtest Online

A A A
Share      Blog   Popular
Copy Format Clear
SELECT CURDATE() - INTERVAL (DAYOFWEEK(CURDATE()) + 5) % 7 DAY AS last_monday, CURDATE() + INTERVAL (8 - DAYOFWEEK(CURDATE())) DAY AS next_sunday;

Stuck with a problem? Got Error? Ask ChatGPT!

Copy Clear