MySQL Current_date and Current_date() are the Date Functions, which are useful to return the current date value in YYYY-MM-DD or YYYYMMDD format. In this article, we show you how to get the Current date with an example. The basic syntax of the Current_date in MySQL to display current date is shown below.
MySQL Current_Date Example
The below query shows you the basic use of this method.
TIP: Both these Date methods are the synonym of the CURDATE(). All those methods write the same MySQL output.
As you can see, it is showing today’s date in YYYY-MM-DD format.
This function is a synonym for CURDATE(). Let me show you an example with all these three MySQL functions curdate(), current_date(), and current_date to get the current date.
SELECT CURDATE() ;
The following query shows you what happens when we add days to the current_date and curdate functions.
SELECT CURRENT_DATE() + 3;
SELECT CURRENT_DATE + 3;
SELECT CURDATE() + 3;
From the above image, they added those days to the current dt. Next, they are displaying the same in YYYYMMDD string format
MySQL Current Date Example 2
In this instance, we show how to use these functions as an argument of another. This query finds the Day number from the current dt.
Similarly, the below query finds the Month Number and Year Number.