/* SELECT COUNT(*) AS Y 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 Y
FROM Posts
WHERE RIGHT(LEFT(CreationDate,11),4) = 2017
*/
SELECT COUNT(*) AS Y
FROM Posts
WHERE DATEPART(YYYY, CreationDate) = 2017
/*
SELECT COUNT(*)
From Posts
WHERE CreationDate BETWEEN '2017-01-01 00:00:00' AND '2018-01-01 00:00:00'
*/

Enter Parameters

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