MySQL Current Date

MySQL Current_date and Current_date() are the MySQL 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 in MySQL with example. The basic syntax of the Current_date in MySQL is as shown below:

CURRENT_DATE;

CURRENT_DATE();

MySQL Current Date Example

The below query shows you the basic use of this current date function.

SELECT CURRENT_DATE();

TIP: Both these Date Functions are the synonym of the CURDATE(). All those functions write the same MySQL output.

MySQL Current Date Example 1

As you can see, it is showing today’s date in YYYY-MM-DD format.

The MySQL current Date function is a synonym for CURDATE(). Let me show you an example with all these three functions curdate(), current_date(), and current_date.

SELECT CURRENT_DATE();

SELECT CURRENT_DATE;

SELECT CURDATE() ;
MySQL Current Date Example 2

The following query shows you what happens when we add days to the current_date(), current_date, and curdate functions in MySQL.

SELECT CURRENT_DATE() + 3;

SELECT CURRENT_DATE + 3;

SELECT CURDATE() + 3;
MySQL Current Date Example 3

From the above image, they added those days to the current date. Next, they are displaying the date in YYYYMMDD string format

MySQL Current_Date Example 2

In this instance, we show how to use these functions as an argument of another function. This query finds the Day number from the current date

SELECT DAY(CURRENT_DATE());
MySQL Current Date Example 4

Similarly, below query finds the Month Number and Year Number from Current Date in MySQL

SELECT YEAR(CURRENT_DATE);

SELECT MONTH(CURDATE());;
MySQL Current Date Example 6