Collections:
DAYOFMONTH() - Day of Month
How to extract the day of month from a given date using the DAYOFMONTH() function?
✍: FYIcenter.com
DAYOFMONTH(date) is a MySQL built-in function that
returns the day of month from a given date.
For example:
SELECT DAYOFMONTH('2023-02-03'), DAYOFMONTH(NOW());
-- +--------------------------+-------------------+
-- | DAYOFMONTH('2023-02-03') | DAYOFMONTH(NOW()) |
-- +--------------------------+-------------------+
-- | 3 | 22 |
-- +--------------------------+-------------------+
Reference information of the DAYOFMONTH() function:
DAYOFMONTH(date): int Returns the day of the month for date, in the range 1 to 31, or 0 for dates such as '0000-00-00' or '2008-00-00' that have a zero day part. Arguments, return value and availability: date: Required. The date to extract the day of month from. int: Return value. The day of month. Available since MySQL 4.
Related MySQL functions:
⇒ DAYOFWEEK() - Day of Week (1=Sunday)
2023-11-17, 953🔥, 0💬
Popular Posts:
How To Convert Numeric Expression Data Types using the CAST() Function in SQL Server Transact-SQL? I...
How to set database to be READ_ONLY in SQL Server? Databases in SQL Server have two update options: ...
How to run Queries with SQL Server Management Studio Express in SQL Server? 1. Launch and connect SQ...
What Is "mysqld" in MySQL? "mysqld" is MySQL server daemon program which runs quietly in background ...
How To End a Stored Procedure Properly in SQL Server Transact-SQL? Where the end of the "CREATE PROC...