MySQL CURRENT_DATE() Function

MySQL | CURRENT_DATE() Function: Learn about the CURRENT_DATE() function, how it works, its usages, syntax, and examples.
Submitted by Apurva Mathur, on October 04, 2022

CURRENT_DATE() Function

The CURRENT_DATE() function is a synonym of the CURDATE() function, it is also used to get the current date/ time.

CURRENT_DATE() Syntax

SELECT CURRENT_DATE();

CURRENT_DATE() Parameter(s)

  • N/A

CURRENT_DATE() 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 CURRENT_DATE() Function Example 1

SELECT CURRENT_DATE();
Example 1: MySQL CURRENT_DATE() Function

MySQL CURRENT_DATE() Function Example 2

SELECT CURRENT_DATE() + 5;
Example 2: MySQL CURRENT_DATE() Function

MySQL CURRENT_DATE() Function Example 3

SELECT CURRENT_DATE() + CURDATE();
Example 3: MySQL CURRENT_DATE() Function



Comments and Discussions!

Load comments ↻






Copyright © 2024 www.includehelp.com. All rights reserved.