mirror of
https://github.com/kremalicious/umami.git
synced 2025-02-05 17:05:46 +01:00
fix getDateWeeklySQL
This commit is contained in:
parent
5aba9acb81
commit
eb05e2ada6
@ -88,11 +88,11 @@ function getDateWeeklySQL(field: string) {
|
||||
const db = getDatabaseType();
|
||||
|
||||
if (db === POSTGRESQL) {
|
||||
return `EXTRACT(DOW FROM ${field})`;
|
||||
return `concat(extract(dow from ${field}), ':', to_char(${field}, 'HH24'))`;
|
||||
}
|
||||
|
||||
if (db === MYSQL) {
|
||||
return `DAYOFWEEK(${field})-1`;
|
||||
return `date_format(${field}, '%w:%H')`;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user