Collections:
CURDATE() - Current Date
How to obtain the current date using the CURDATE() function?
✍: FYIcenter.com
CURDATE() is a MySQL built-in function that
returns the current date.
For example:
SELECT CURDATE(), CURDATE()+1; -- +------------+-------------+ -- | CURDATE() | CURDATE()+1 | -- +------------+-------------+ -- | 2023-11-11 | 20231112 | -- +------------+-------------+
Reference information of the CURDATE() function:
CURDATE(): dt Returns the current date as a value in 'YYYY-MM-DD' or YYYYMMDD format, depending on whether the function is used in string or numeric context. Arguments, return value and availability: dt: Return value. The current date as a string or number. Available since MySQL 4.
Related MySQL functions:
⇒ CURRENT_DATE() - Synonym for CURDATE()
⇐ CONVERT_TZ() - Converting Time Zone
2023-11-17, 913🔥, 0💬
Popular Posts:
Can Binary Strings Be Converted into NUMERIC or FLOAT Data Types in SQL Server Transact-SQL? Can bin...
How To Get the Definition of a User Defined Function Back in SQL Server Transact-SQL? If you want ge...
How To Use GO Command in "sqlcmd" in SQL Server? "sqlcmd" is a command line client application to ru...
How To Fix the INSERT Command Denied Error in MySQL? The reason for getting the "1142: INSERT comman...
Where to find answers to frequently asked questions on Downloading and Installing SQL Server 2005 Ex...