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 |
xtradi
Starting Member
7 Posts |
Posted - 2009-05-13 : 00:37:15
|
I want to generate a list of date.The list of date i want is the date for Tuesday for every week in one year.can somebody help me?thanks |
|
khtan
In (Som, Ni, Yak)
17689 Posts |
|
xtradi
Starting Member
7 Posts |
Posted - 2009-05-13 : 00:53:13
|
is my code correct for displaying Tuesday in year 2009?select *from dbo.F_TABLE_DATE ( '20090101','20091231' )where day_of_week=3 |
|
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2009-05-13 : 00:59:59
|
quote: Originally posted by xtradi is my code is correct for displaying Tuesday in year 2009?select *from dbo.F_TABLE_DATE ( '20090101','20091231' )where day_of_week=3
yes.Or you can also check forWHERE weekday_name = 'Tue' KH[spoiler]Time is always against us[/spoiler] |
|
|
xtradi
Starting Member
7 Posts |
Posted - 2009-05-13 : 01:01:05
|
Thanks a lot khtan! |
|
|
|
|
|