Use IYYY in combination with IW
Otherwise, we could end up with a wrong date, see: https://community.oracle.com/thread/997899
This commit is contained in:
parent
6a6af964df
commit
3484ad2aaf
|
@ -1698,7 +1698,7 @@ class Feeds extends Handler_Protected {
|
|||
|
||||
if (DB_TYPE == "pgsql") {
|
||||
$sanity_interval_qpart = "date_entered >= NOW() - INTERVAL '1 hour' AND";
|
||||
$yyiw_qpart = "to_char(date_entered, 'YYYY-IW') AS yyiw";
|
||||
$yyiw_qpart = "to_char(date_entered, 'IYYY-IW') AS yyiw";
|
||||
} else {
|
||||
$sanity_interval_qpart = "date_entered >= DATE_SUB(NOW(), INTERVAL 1 hour) AND";
|
||||
$yyiw_qpart = "concat(year(date_entered),lpad(weekofyear(date_entered), 2, '0')) AS yyiw";
|
||||
|
|
Loading…
Reference in New Issue