| Author |
Topic |
|
Thiyagu_04
Starting Member
37 Posts |
Posted - 2010-01-27 : 08:11:21
|
| Hi allusing datepart i am getting following result.Select Datepart("week", '12/27/2009')Out put - 53Select Datepart("week", '01/01/2010')Out put - 1Instead of this i want continues week number for two given dates.Thanks for the help |
|
|
khtan
In (Som, Ni, Yak)
17689 Posts |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2010-01-27 : 10:55:34
|
quote: Originally posted by Thiyagu_04 Hi allusing datepart i am getting following result.Select Datepart("week", '12/27/2009')Out put - 53Select Datepart("week", '01/01/2010')Out put - 1Instead of this i want continues week number for two given dates.Thanks for the help
what do you mean continuos number? can you explain that |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2010-01-28 : 00:23:18
|
quote: Originally posted by Thiyagu_04 Hi allusing datepart i am getting following result.Select Datepart("week", '12/27/2009')Out put - 53Select Datepart("week", '01/01/2010')Out put - 1Instead of this i want continues week number for two given dates.Thanks for the help
What happens if you have dates back to 2008?MadhivananFailing to plan is Planning to fail |
 |
|
|
Thiyagu_04
Starting Member
37 Posts |
Posted - 2010-01-28 : 00:45:30
|
| Continues Number in the sense i am having From date and To date.eg:From date as 12/28/2009To date as 01/27/2010(12/28,12/29,12/30,12/31,01/01,02/01) - weekid 1 (03/01-09/01) - weekid 2and so on like this i want.Hi madivananIf 2008 is selected that would my first week. |
 |
|
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2010-01-28 : 01:02:15
|
Looks like ISO week to me. Did you check out the link i posted ?And what is the week value if the from /to date is likeFrom date as 11/12/2009To date as 01/18/2010 KH[spoiler]Time is always against us[/spoiler] |
 |
|
|
Thiyagu_04
Starting Member
37 Posts |
Posted - 2010-01-28 : 01:04:56
|
quote: Originally posted by khtan Looks like ISO week to me. Did you check out the link i posted ? KH[spoiler]Time is always against us[/spoiler]
I am using SQL 2000Is it possible to use ISO week |
 |
|
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2010-01-28 : 01:07:15
|
quote: Originally posted by Thiyagu_04
quote: Originally posted by khtan Looks like ISO week to me. Did you check out the link i posted ? KH[spoiler]Time is always against us[/spoiler]
I am using SQL 2000Is it possible to use ISO week
then use the functions provided there KH[spoiler]Time is always against us[/spoiler] |
 |
|
|
Thiyagu_04
Starting Member
37 Posts |
Posted - 2010-01-28 : 04:45:46
|
| Thanks for AllUsing Datepart and case statement i have solved this problem.RegardsThiyagu_04 |
 |
|
|
|