CREATE PROCEDURE spGetDailyVisitorCount
	@start_date datetime,
	@end_date datetime
AS
BEGIN
	SELECT DATEADD(dd, 0, DATEDIFF(dd, 0, visitor_date)), count(*)
	FROM [digiozportal].[dbo].[tblVisitor]
	WHERE datediff(d, visitor_date, @start_date) <=0
	AND datediff(d, visitor_date, @end_date) >=0
	GROUP BY DATEADD(dd, 0, DATEDIFF(dd, 0, visitor_date))
	ORDER BY DATEADD(dd, 0, DATEDIFF(dd, 0, visitor_date))	
END

-- Comment: DATEADD(dd, 0, DATEDIFF(dd, 0, visitor_date)) is a hack to strip time from datetime.
