Commit 88d0e98c authored by Benjamin Eberlei's avatar Benjamin Eberlei

DDC-1271 - Fix date diff in PostgreSQL when timestamps are passed by casting...

DDC-1271 - Fix date diff in PostgreSQL when timestamps are passed by casting everything into dates explicitly.
parent d096f0aa
......@@ -94,7 +94,7 @@ class PostgreSqlPlatform extends AbstractPlatform
public function getDateDiffExpression($date1, $date2)
{
return '('.$date1 . '-'.$date2.')';
return '(DATE(' . $date1 . ')-DATE(' . $date2 . '))';
}
public function getDateAddDaysExpression($date, $days)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment