Get Current Date in MySQL: CURDATE() Guide
In MySQL, you can use the CURDATE() function to get the current date. Here is an example:
SELECT CURDATE();
The above example will return a result set containing today’s date, for example: 2022-01-27.
You can also format the output of a date using the DATE_FORMAT() function. Here is an example:
SELECT DATE_FORMAT(CURDATE(), '%Y-%m-%d') AS formatted_date;
The above example will return a formatted date, such as: 2022-01-27.
Please note that the CURDATE() function returns the current date of the server, not the client.