Just testing out some dates. MyDate parameter is a string and must in the format of YYYYMMDD
Q&A for students, teachers, polyglots, and anyone interested in the techniques of second-language acquisition
-- 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('c++',tags) > 0 order by score;