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, 1097🔥, 0💬
Popular Posts:
How to obtain the number of rows found by the last SELECT statement using the FOUND_ROWS() function?...
Where to find answers to frequently asked questions on CREATE, ALTER and DROP Statements in MySQL? H...
How to put statements into a statement block in SQL Server Transact-SQL? You can put statements into...
Is PL/SQL Language Case Sensitive in Oracle? PL/SQL language is not case sensitive: Reserved words a...
Is SQL Server Transact-SQL case sensitive? No. Transact-SQL is not case sensitive. Like the standard...