MySQL 8.1
CURDATE()Return value
A date (DATE) in YYYY-MM-DD format
Examples
Today's date
MySQL 8.1
SELECT CURDATE();Age as of today
MySQL 8.1
SELECT member_name,
TIMESTAMPDIFF(YEAR, birthday, CURDATE()) AS age
FROM FamilyMembers;Details
The synonym is CURRENT_DATE. The date is taken in the session time zone. In a numeric expression the date turns into the number YYYYMMDD, so CURDATE() - 7 is not the date a week ago but a number. To shift the date, use CURDATE() - INTERVAL 7 DAY.