Results 1 to 2 of 2

Thread: How to get the cummulative week number and starting day of the week.

Threaded View

  1. #1
    Join Date
    Oct 2009
    Posts
    1

    How to get the cummulative week number and starting day of the week.

    Hi,
    I am struggling to get the week number and week day of the particular day. I know we can use Datepart function which is available in sql server 2008 to display the week number of the given date. but my situation is different. for example
    Datepart(wk,'2009-12-30') gives 53 weeks
    Datepart(wk,'2010-01-02') gives 1. but I wanted to display it as 54. How to generated it dynamically. Pls find the attached file along with this for more information. BugDate is the input and week number and starting of the week day are the expected outputs.... Can any one help me to solve this problem..

    Thanks in advance.
    Attached Files Attached Files

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •