Forum Replies Created

Viewing post 1 (of 1 total)

  • RE: Calculating the Last Friday of any date

    Hi, This code is work only for finding the last friday of the particular month

     

     

    Declare @Ldate DateTime

    Declare @LWN int

    Declare @RWN int

    Set @RWN=6 -- Sunday=1, Monday=2........

    SELECT @LDate=DATEADD(MONTH, 1, 1-DAY(GETDATE())+GETDATE())-1

    SELECT @LWN=DatePART(dw,DATEADD(MONTH, 1,...

Viewing post 1 (of 1 total)