|
Definitions More Info. | Definition ID | 706 | Title | SQL | Category | NOTES | Definition | yilin kacinci haftasi sorgusu | Definition Description | http://stackoverflow.com/questions/13116222/how-to-get-week-number-of-the-month-from-the-date-in-sql-server-2008 1- Pazar gunlerini haftanin baslangici olarak alirsak, asagidaki ilk sorgu dogru: declare @date datetime = '2016-01-08' select datepart(day, datediff(day, 0, @date)/7 * 7)/7 + 1 2- Eger ay degisimlerinde haftaniz bolunuyorsa, asagidaki sorguyu kullanabilirim. Ancak cevap dogru olmayacaktir !!! declare @date datetime = '2016-01-08' select datediff(week, dateadd(week, datediff(week, 0, dateadd(month, datediff(month, 0, @date), 0)), 0), @date - 1) + 1 | RecordBy | cunay | Record Date | 16-02-2016 10:21:18 | Düzenle | | Kopyala | | Sil | | |
|
|