finding the Day of the week?

  • can anyone help please, I need to find the day of the week as a word in a Stored Procedure, in VB I would use :-

     

    dayofweek = format(date,"dddd") -- this would return "Monday" or something like it

     

    can some one tell me what the equilivent is please

  • I've just discovered how to do it, I've posted what I've found below

    set @sDayofWeek = datename(weekday,'10/11/2005') -- returns "Tuesday"

    set @sDayofWeek = datename(day,'10/11/2005') -- returns "10"

    set @sDayofWeek = datename(month,'10/11/2005') -- returns "November"

    set @sDayofWeek = datename(year,'10/11/2005') -- returns "2005"

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

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