Return the day of the month for a date:
SELECT DAY('2017/08/25') AS DayOfMonth;
Try it Yourself »
The DAY() function returns the day of the month (from 1 to 31) for a specified date.
DAY(
date)
Parameter | Description |
---|---|
date | Required. The date to return the day of the month from |
Works in: | SQL Server (starting with 2008), Azure SQL Database, Azure SQL Data Warehouse, Parallel Data Warehouse |
---|
Return the day of the month for a date:
SELECT DAY('2017/08/13 09:08') AS DayOfMonth;
Try it Yourself »
截取页面反馈部分,让我们更快修复内容!也可以直接跳过填写反馈内容!