/* SELECT COUNT(*) AS B FROM Posts WHERE RIGHT(LEFT(Creat...

0

Please login or register to vote for this query.

(click on this box to dismiss)

Craft CMS Meta

Q&A about the site for administrators, end users, developers and designers for Craft CMS

/*
SELECT COUNT(*) AS B
FROM Posts
WHERE RIGHT(LEFT(CreationDate,11),4) = 2017*/
/*
SELECT COUNT(*) AS B
FROM Posts
WHERE DATEPART(YYYY, CreationDate) = 2017

SELECT COUNT(*) AS B
FROM Posts
WHERE CreationDate BETWEEN '2017-01-01 00:00:00' AND '2018-01-01 00:00:00'
*/
SELECT TOP 1 CreationDate, LEFT(CreationDate,11), LEFT(CreationDate, 5)
FROM Posts

Enter Parameters

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