Hi guys
I have a procedure that return start date and end date as follows:
create procedure GetWeekdays](
@Date Date
)
As
As
Declare @Fri datetime, @Mon datetime
set @Fri=(SELECT DATEADD(d, 6- DATEPART(dw, @Date), @Date))
set @Mon= (SELECT DATEADD(wk, DATEDIFF(wk,0,@Date), 0) MondayOfCurrentWeek)
DECLARE @StartDate DATE = @Mon, @EndDate DATE = @Fri
SELECT date FROM ( SELECT DATE = DATEADD(DAY, rn - 1, @StartDate) FROM (
SELECT TOP (DATEDIFF(DAY, @StartDate, DATEADD(DAY,1,@EndDate)))
rn = ROW_NUMBER() OVER (ORDER BY s1..object_id])
FROM sys.all_objects AS s1
CROSS JOIN sys.all_objects AS s2
ORDER BY s1..object_id] ) AS x ) AS y
inputed: 2017/12/04
Results:
2017/12/04
2017/12/05
2017/12/06
2017/12/07
2017/12/08
How can I implement this procedure in such a way that when I press the Button from a Itemview a subview show up with this results.
TIA.