Compare Dates Weekly Starting From Monday Instead Of Sunday ?

Posted on 2005-04-12
Last Modified: 2013-12-24
I want to work out weekly stats on specific records for the year, what i want to achieve is the following:  -

I want to count a new week starting on a monday and ending on sunday

For each year start week 1 on the first monday of january

How do i go about setting this up ?

I have the following query but this counts from Sunday first

FROM Table
WHERE DATEPART(week, GETDATE()) = DATEPART(week, dateadded)

So the output would be for today 12/04/05: -


Record count 3 etc..


Question by:jturkington
    LVL 35

    Accepted Solution

    well all you have to do is add 1 to the date then right?

    Author Comment

    of course ..........., sorry for the silly question

    LVL 35

    Expert Comment

    no problem.

    I can't tell you how many times I have missed the obvious answer thinking it must be more complex.

    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    Join & Write a Comment

    Suggested Solutions

    This is a guide to setting up a new WHM/cPanel Server to be used for web hosting accounts. It is intended for web hosting company administrators and dedicated server owners. For under $99 per month (considering normal rate of Big Data Cetnters like …
    If you don't have the right permissions set for your WordPress location in IIS, you won't be able to perform automatic updates. Here's how to fix the problem.
    Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…
    Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

    730 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    16 Experts available now in Live!

    Get 1:1 Help Now