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, 1092🔥, 0💬
Popular Posts:
How To Format Time Zone in +/-hh:mm Format in SQL Server Transact-SQL? From the previous tutorial, y...
How To Divide Query Output into Multiple Groups with the GROUP BY Clause in SQL Server? Sometimes, y...
How To Select All Columns of All Rows from a Table with a SELECT statement in SQL Server? The simple...
What is test testing area for? The testing area is provided to allow visitors to post testing commen...
How To Recover a Dropped Index in Oracle? If you have the recycle bin feature turned on, dropped ind...