Using Dates

0

Please login or register to vote for this query.

(click on this box to dismiss)

Just testing out some dates. MyDate parameter is a string and must in the format of YYYYMMDD

Anime and Manga

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 and ( CHARINDEX('python',tags) > 0 or CHARINDEX('java',tags) > 0
or CHARINDEX('c#',tags) > 0 or CHARINDEX('javascript',tags) > 0 or CHARINDEX('c++',tags) > 0 )
order by score DEsc;

Enter Parameters

Options:
Switch to meta site
loading Hold tight while we fetch your results