Find the function to get the name of a particular day in a week.
-
datename(week,getdate())
-
datename(dw,getdate())
-
datename(wk,date())
-
datename(day,getdate())
B
Correct answer
Explanation
The DATENAME function in SQL Server returns the name of a specified date part as a string. To get the day name (like 'Monday', 'Tuesday'), use DATENAME(dw, GETDATE()) where 'dw' stands for day of week (weekday). Option B is correct. Option A uses 'week' which returns week number, not day name. Option D uses 'day' which returns the day number (1-31).