datediff

0

Please login or register to vote for this query.

(click on this box to dismiss)

Raspberry Pi

Q&A for users and developers of hardware and software for Raspberry Pi

SELECT TOP 10
DATEDIFF(HOUR, p.CreationDate, a.CreationDate), p.CreationDate, a.CreationDate
FROM Posts p
INNER JOIN Posts a ON a.id = p.AcceptedAnswerId
WHERE p.AcceptedAnswerId IS NOT NULL
AND datepart(year, p.CreationDate) = 2017

Enter Parameters

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