Click here to Skip to main content
15,895,142 members
Home / Discussions / Database
   

Database

 
Questionhow to get week number and startday of the week in sql server 2008 Pin
chakran28-Oct-09 23:40
chakran28-Oct-09 23:40 
AnswerRe: how to get week number and startday of the week in sql server 2008 Pin
Mycroft Holmes29-Oct-09 0:33
professionalMycroft Holmes29-Oct-09 0:33 
GeneralRe: how to get week number and startday of the week in sql server 2008 Pin
chakran29-Oct-09 0:45
chakran29-Oct-09 0:45 
GeneralRe: how to get week number and startday of the week in sql server 2008 Pin
Mycroft Holmes29-Oct-09 2:03
professionalMycroft Holmes29-Oct-09 2:03 
GeneralRe: how to get week number and startday of the week in sql server 2008 Pin
chakran30-Oct-09 1:09
chakran30-Oct-09 1:09 
GeneralRe: how to get week number and startday of the week in sql server 2008 Pin
Niladri_Biswas30-Oct-09 1:45
Niladri_Biswas30-Oct-09 1:45 
GeneralRe: how to get week number and startday of the week in sql server 2008 Pin
chakran30-Oct-09 2:20
chakran30-Oct-09 2:20 
GeneralRe: how to get week number and startday of the week in sql server 2008 Pin
Niladri_Biswas30-Oct-09 3:36
Niladri_Biswas30-Oct-09 3:36 
Come on. it is correct. Because if you execute

select Datepart(wk,'12/30/2008') you will get the weeknumber as 53 and
select Datepart(wk,'1/2/2009') will yield 1.

As per your requirement, which you specified it should be 54. and henceforth the result.

For the first part(if the years will be increased in the future. so instead of adding condition many times we need to summarize that) we need to work on.
Smile | :)

Niladri Biswas

GeneralRe: how to get week number and startday of the week in sql server 2008 Pin
chakran30-Oct-09 4:06
chakran30-Oct-09 4:06 
GeneralRe: how to get week number and startday of the week in sql server 2008 Pin
Niladri_Biswas30-Oct-09 5:11
Niladri_Biswas30-Oct-09 5:11 
GeneralRe: how to get week number and startday of the week in sql server 2008 Pin
chakran1-Nov-09 21:05
chakran1-Nov-09 21:05 
AnswerRe: how to get week number and startday of the week in sql server 2008 [modified] Pin
Niladri_Biswas29-Oct-09 22:30
Niladri_Biswas29-Oct-09 22:30 
Questiondatabase Pin
sydneylandscaper28-Oct-09 21:56
sydneylandscaper28-Oct-09 21:56 
AnswerRe: database Pin
WoutL28-Oct-09 22:48
WoutL28-Oct-09 22:48 
AnswerRe: database Pin
dan!sh 29-Oct-09 0:23
professional dan!sh 29-Oct-09 0:23 
AnswerRe: database Pin
Mycroft Holmes29-Oct-09 0:25
professionalMycroft Holmes29-Oct-09 0:25 
AnswerRe: database Pin
dxlee29-Oct-09 4:16
dxlee29-Oct-09 4:16 
AnswerRe: database Pin
dreamaway82029-Oct-09 5:46
dreamaway82029-Oct-09 5:46 
AnswerRe: database Pin
Eddy Vluggen29-Oct-09 9:29
professionalEddy Vluggen29-Oct-09 9:29 
QuestionThe Saga Continues Pin
Roger Wright28-Oct-09 21:45
professionalRoger Wright28-Oct-09 21:45 
QuestionHow to seperate records Pin
kKamel28-Oct-09 20:35
kKamel28-Oct-09 20:35 
AnswerRe: How to seperate records Pin
Mycroft Holmes29-Oct-09 0:14
professionalMycroft Holmes29-Oct-09 0:14 
GeneralRe: How to seperate records Pin
kKamel29-Oct-09 0:44
kKamel29-Oct-09 0:44 
GeneralRe: How to seperate records Pin
Mycroft Holmes29-Oct-09 2:01
professionalMycroft Holmes29-Oct-09 2:01 
QuestionRe: How to seperate records Pin
Eddy Vluggen29-Oct-09 12:03
professionalEddy Vluggen29-Oct-09 12:03 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.