diff --git a/src/Query/Postgresql/DatePart.php b/src/Query/Postgresql/DatePart.php index faba0a808..04cecf05f 100644 --- a/src/Query/Postgresql/DatePart.php +++ b/src/Query/Postgresql/DatePart.php @@ -22,7 +22,7 @@ public function parse(Parser $parser): void $parser->match(Lexer::T_OPEN_PARENTHESIS); $this->dateString = $parser->ArithmeticPrimary(); $parser->match(Lexer::T_COMMA); - $this->dateFormat = $parser->ArithmeticPrimary(); + $this->dateFormat = $parser->ArithmeticExpression(); $parser->match(Lexer::T_CLOSE_PARENTHESIS); }