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, 249🔥, 0💬
Popular Posts:
How to execute statements under given conditions in SQL Server Transact-SQL? How to use IF ... ELSE ...
How To Query Tables and Loop through the Returning Rows in MySQL? The best way to query tables and l...
How To Use SQL*Plus Built-in Timers in Oracle? If you don't have a stopwatch/timer and want to measu...
How To Convert Numeric Expression Data Types using the CONVERT() Function in SQL Server Transact-SQL...
How To Update Multiple Rows with One UPDATE Statement in SQL Server? If the WHERE clause in an UPDAT...