Getting day of week from datetime value

  • Does anyone know how to get the day of week to return from a from a datetime value? For example, how could I get SQL Server to tell me that this date (2003-07-27 23:55:02.093)was a Sunday?

    Thanks!

  • Select DATENAME(dw , Cast('2003-07-27 23:55:02.093' as DateTime))

    Don't have to do the cast bit!

  • Thanks!

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply