Commit 00b6667a 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 323f224b
...@@ -94,7 +94,7 @@ class PostgreSqlPlatform extends AbstractPlatform ...@@ -94,7 +94,7 @@ class PostgreSqlPlatform extends AbstractPlatform
public function getDateDiffExpression($date1, $date2) public function getDateDiffExpression($date1, $date2)
{ {
return '('.$date1 . '-'.$date2.')'; return '(DATE(' . $date1 . ')-DATE(' . $date2 . '))';
} }
public function getDateAddDaysExpression($date, $days) 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