I have an input: @dateInput
.
For example: @dateInput = 2013/10/02
(format: yyyy/MM/dd).
How can I get weeks (from Monday to Friday) in October like this by T-SQL
StartWeek EndWeek
2013-10-01 00:00:00.000 2013-10-05 00:00:00.000
2013-10-07 00:00:00.000 2013-10-12 00:00:00.000
2013-10-14 00:00:00.000 2013-10-19 00:00:00.000
2013-10-21 00:00:00.000 2013-10-26 00:00:00.000
2013-10-28 00:00:00.000 2013-10-31 00:00:00.000
Thanks all !