Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
pavlos
Yak Posting Veteran
59 Posts |
Posted - 2012-01-22 : 22:47:21
|
| hey all..i use the following to retrieve the weekSELECT DATEPART(WW, H.FINISHDATETIME)) as 'WEEK'query works fine but doesn't match my existing format.my current format returns dates as follows31st dec 2011 = WEEK 521st jan 2012 = WEEK 522nd jan 2012 = WEEK 19th jan 2012 = WEEK 2but SELECT DATEPART(WW, H.FINISHDATETIME)) as 'WEEK'returns the following31st dec 2011 = WEEK 531st jan 2012 = WEEK 532nd jan 2012 = WEEK 539th jan 2012 = WEEK 1any ideas on how to change the format? |
|
|
Lamprey
Master Smack Fu Yak Hacker
4614 Posts |
Posted - 2012-01-23 : 11:54:25
|
Are you runnig in 2 different environments? Is it possible that the DATEFIRST value is different? This is also affected by the LANGUAGE settings. You could check with SELECT @@DATEFIRST |
 |
|
|
|
|
|