Doctrine: calculating datetime difference
题
How can i calculate the difference between datetime column and now (for example 'created_at' and NOW()) in Doctrine?
I Googled it alot and couldn't find an answer..
Thanks in advance!
解决方案
Have you tried this?
$query->select('DATEDIFF(NOW(), datetime column)')
不隶属于 StackOverflow