Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase ««12

Get data month to calander week Expand / Collapse
Author
Message
Posted Sunday, December 22, 2013 1:14 AM
Valued Member

Valued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued Member

Group: General Forum Members
Last Login: Friday, July 22, 2016 9:38 AM
Points: 52, Visits: 206
Yes you are correct my week starts from wednesday and end on thrusday.
Post #1525331
Posted Sunday, December 22, 2013 1:16 AM
Valued Member

Valued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued Member

Group: General Forum Members
Last Login: Friday, July 22, 2016 9:38 AM
Points: 52, Visits: 206
Yes you correct my start week from thrusay and end on wednesday...
Post #1525332
Posted Sunday, December 22, 2013 2:40 PM


SSC-Forever

SSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-Forever

Group: General Forum Members
Last Login: Today @ 4:03 PM
Points: 40,983, Visits: 38,278
Sounds "urgent". Only 4 months have gone by since I asked that question. Have you done anything to help yourself on this problem in all that time?

--Jeff Moden
"RBAR is pronounced "ree-bar" and is a "Modenism" for "Row-By-Agonizing-Row".

First step towards the paradigm shift of writing Set Based code:
Stop thinking about what you want to do to a row... think, instead, of what you want to do to a column."

Helpful Links:
How to post code problems
How to post performance problems
Post #1525385
Posted Sunday, December 22, 2013 11:15 PM
Valued Member

Valued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued Member

Group: General Forum Members
Last Login: Friday, July 22, 2016 9:38 AM
Points: 52, Visits: 206
Jeff,

Actually very sorry to say i dont find any notification from notifications@sqlservercentral.com. I tried 12 hours my self and now i have done.

Thank you you helped me


Select 'WEEK' = CASE DATEPART(weekday,START_DATETIME)

When 5 then DATEPART(week,START_DATETIME)+1

When 6 then DATEPART(week,START_DATETIME)+1

When 7 then DATEPART(week,START_DATETIME)+1

ELSE DATEPART(week,START_DATETIME)

END

From ...
Post #1525412
Posted Monday, December 23, 2013 5:45 AM


SSC-Forever

SSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-Forever

Group: General Forum Members
Last Login: Today @ 4:03 PM
Points: 40,983, Visits: 38,278
Oh, be careful with that. The "week" datepart can change based on the setting of DATEFIRST. And, no... you shouldn't count on that setting.

I'm on my way to work. I'll see what I can do when I get home. Maybe someone else will pick this up in the meantime.


--Jeff Moden
"RBAR is pronounced "ree-bar" and is a "Modenism" for "Row-By-Agonizing-Row".

First step towards the paradigm shift of writing Set Based code:
Stop thinking about what you want to do to a row... think, instead, of what you want to do to a column."

Helpful Links:
How to post code problems
How to post performance problems
Post #1525494
« Prev Topic | Next Topic »

Add to briefcase ««12

Permissions Expand / Collapse