Week Ending Dates

  • I would like to identify all of the Fridays in a year and then group data into these weeks. Any suggestions would be appreciated.

  • set datefirst 1   -- start weeks on mondays

    select  datecolumn

    from myTable

    where datepart(dw, datecolumn) = 5

    Have a look in BOL at DATEPART for further info on datefunctions.

    /Kenneth

     

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

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