Open In App

CURRENT_DATE() Function in MySQL

Last Updated : 28 Sep, 2020
Improve
Improve
Like Article
Like
Save
Share
Report

In this article, you will see how you can use the current_date function and you will see both formats in the string and numeric respectively.

CURRENT_DATE :
In this function, you will see how you can use the current date function. In MSQSSL, format of date ‘‘YYYY-MM-DD’(in string) format or YYYYMMDD'(in numeric) format.

Syntax :

CURRENT_DATE()

Parameter :
This function does not accept any parameter.

Returns –
It returns the current date.

Example-1 :
CURRENT_DATE() function to find the present date.

SELECT CURRENT_DATE() AS CURR_DATE;

Output :

CURR_DATE
2020-09-22

Example-2 :
CURRENT_DATE() function to find the present date in YYYYMMDD format.

SELECT CURRENT_DATE()+0 AS CURR_DATE;

Output :

CURR_DATE
20200922

Example-3 :
Adding 3 Days to CURRENT_DATE() function to find the next date.

SELECT CURRENT_DATE()+3 AS NEXT_DATE;

Output :

NEXT_DATE
20200925

Like Article
Suggest improvement
Share your thoughts in the comments

Similar Reads