• +91 9723535972
  • info@interviewmaterial.com

MS SQL Interview Questions and Answers

Question - How do I find the day of the week?

Answer - Using the weekday argument as its first parameter, SQL Server's DATEPART() function returns the day of the week, returning 1 for Sunday, 2 for Monday, and so on. The following example uses the GETDATE() function combined with the DATEPART() function to retrieve the current day value: SELECT DATEPART(weekday, GETDATE())

Comment(S)

Show all Coment

Leave a Comment




NCERT Solutions

 

Share your email for latest updates

Name:
Email:

Our partners