DATEPART(month, '4-29-1988') : DATEPART « Date Timezone « SQL Server / T-SQL
- SQL Server / T-SQL
- Date Timezone
- DATEPART
DATEPART(month, '4-29-1988')
1>
2>
3>
4> -- DATEPART() returns an integer value
5>
6>
7>
8> SELECT DATEPART(month, '4-29-1988')
9> GO
-----------
4
(1 rows affected)
Related examples in the same category
1. | DATEPART: return part of a date as an integer value | | |
2. | Dateparts and Abbreviations | | |
3. | select DATEPART(weekday, '2002-09-30 11:35:00') | | |
4. | select DATEPART(week, '2002-09-30 11:35:00') | | |
5. | select DATEPART(quarter, '2002-09-30 11:35:00') | | |
6. | select DATEPART(dayofyear, '2002-09-30 11:35:00') | | |
7. | DATEPART(m,GETDATE()) | | |
8. | DATEPART(dw,GETDATE()) | | |
9. | DATEPART(yy,GETDATE()) | | |
10. | DATEPART(wk,GETDATE()) | | |
11. | DATEPART(n,GETDATE()) | | |
12. | DATEPART(mi,GETDATE()) | | |