From 3ef1bd39567e88e3b02cf9e27b55beb83b31d717 Mon Sep 17 00:00:00 2001 From: Christopher Georg Date: Sat, 17 Jun 2023 00:29:10 +0200 Subject: [PATCH] feat: improve date_part() for postgres --- src/Query/Postgresql/DatePart.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); }