Skip to content
Related Articles

Related Articles

Improve Article
Save Article
Like Article

CURRENT_DATE() Function in MySQL

  • Last Updated : 28 Sep, 2020

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.

Attention reader! Don’t stop learning now. Learn SQL for interviews using SQL Course  by GeeksforGeeks.

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
My Personal Notes arrow_drop_up
Recommended Articles
Page :

Start Your Coding Journey Now!