Home »
MySQL »
MySQL date/time Functions
MySQL CURDATE() Function
MySQL | CURDATE() Function: Learn about the CURDATE() function, how it works, its usages, syntax, and examples.
Submitted by Apurva Mathur, on October 04, 2022
CURDATE() Function
To get the current date/ time we use CURDATE() function. It returns us the current date.
CURDATE() Syntax
SELECT CURDATE();
CURDATE() Parameter(s)
CURDATE() Return Value
It returns the current date in the format of 'YYYY-MM-DD' if the function is used in a string context. Or, it returns in the format of YYYYMMDD if the function is used in numeric context.
MySQL CURDATE() Function Example 1
SELECT CURDATE();
MySQL CURDATE() Function Example 2
SELECT CURDATE()+ 20;
This expression will give you the date + 20.