Just testing out some dates. MyDate parameter is a string and must in the format of YYYYMMDD
Q&A for anime and manga fans
-- Using Dates -- Just testing out some dates DECLARE @MyDate DATETIME Declare @inputDate varchar(8) Set @InputDate = ##MyDate## set @MyDate = Convert(datetime, @InputDate) SELECT * From posts Where (SELECT YEAR(CreationDate)) = @inputDate and CHARINDEX('programming',tags) > 0 order by CommentCount DEsc;