mirror of
https://github.com/espocrm/espocrm.git
synced 2026-06-28 06:56:05 +00:00
pg fix week
This commit is contained in:
@@ -262,6 +262,10 @@ class PostgresqlQueryComposer extends BaseQueryComposer
|
||||
case 'WEEK':
|
||||
case 'WEEK_0':
|
||||
case 'WEEK_1':
|
||||
if (str_starts_with($part, "'")) {
|
||||
$part = "DATE " . $part;
|
||||
}
|
||||
|
||||
return "CONCAT(TO_CHAR({$part}, 'YYYY'), '/', TRIM(LEADING '0' FROM TO_CHAR({$part}, 'IW')))";
|
||||
|
||||
case 'QUARTER':
|
||||
|
||||
Reference in New Issue
Block a user