DATEPART(dw,GETDATE()) : DATEPART « Date Timezone « SQL Server / T-SQL
- SQL Server / T-SQL
- Date Timezone
- DATEPART
DATEPART(dw,GETDATE())
1>
2> SELECT DATEPART(dw,GETDATE())
3> GO
-----------
5
(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(yy,GETDATE()) | | |
9. | DATEPART(wk,GETDATE()) | | |
10. | DATEPART(n,GETDATE()) | | |
11. | DATEPART(mi,GETDATE()) | | |
12. | DATEPART(month, '4-29-1988') | | |