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, 1923🔥, 0💬
Popular Posts:
Where to find tutorials to answer some frequently asked questions on Microsoft SQL Server Transact-S...
How to check if two JSON values have overlaps using the JSON_OVERLAPS() function? JSON_OVERLAPS(json...
How To List All Stored Procedures in the Current Database in SQL Server Transact-SQL? If you want to...
What Are Date and Time Functions in MySQL? MySQL offers a number of functions for date and time valu...
What is sqlservr.exe - Process - SQL Server (SQLEX?PRESS) in SQL Server? Process sqlservr.exe is the...