--- /home/holl/CustomerTimeAccounting.pm 2005-06-27 13:56:50.000000000 +0200 +++ CustomerTimeAccounting.pm 2005-06-27 15:18:00.738666592 +0200 @@ -78,10 +78,10 @@ } %Period = ( - ThisWeek => "week(time_accounting.create_time) = week(curdate())", - ThisMonth => "month(time_accounting.create_time) = month(curdate())", - ThisYear => "year(time_accounting.create_time) = year(curdate())", - LastYear => "year(time_accounting.create_time) = year(curdate())-1", + ThisWeek => "date_part('week', time_accounting.create_time) = date_part('week', current_date)", + ThisMonth => "date_part('month', time_accounting.create_time) = date_part('month', current_date)", + ThisYear => "date_part('year', time_accounting.create_time) = date_part('year', current_date)", + LastYear => "date_part('year', time_accounting.create_time) = date_part('year', current_date)-1", ); foreach my $p (keys %Period) {