A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://www.geeksforgeeks.org/sql/curdate-function-in-mysql/ below:

CURDATE() Function in MySQL - GeeksforGeeks

CURDATE() Function in MySQL

Last Updated : 23 Jul, 2025

The CURDATE() function in MYSQL is used to return the current date. The date is returned to the format of "YYYY-MM-DD" (string) or as YYYYMMDD (numeric). This function equals the CURRENT_DATE() function. In this article, we are going to discuss about CURDATE() function in detail.

Syntax

CURDATE();

Parameter

This method does not accept any parameter.

Returns

It returns the current date.
Query

Getting the current date in the format of YYYY-MM-DD (string).

SELECT CURDATE();
Output output 1 Query

Getting the date 1 day later than the current date in the format of YYYYMMDD (numeric).

SELECT CURDATE() + 1;
Output output 2 Query

Getting the date of 5 days before of current date in the format of YYYYMMDD (numeric).

SELECT CURDATE() + 5;
Output output 3 Query

If you want to subtract the desired number of days from the current date using CURDATE() function.

SELECT CURDATE() -22;
Output output 4 Applications of CURDATE() Function

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4