diff --git a/ChangeLog b/ChangeLog
index a028146229c3cdbad87ac184b85e108fdc1598bd..48e255f4a81076fd9f86092fbb0d58391c858864 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -24,6 +24,7 @@ FIX [ bug #3321 ] Users with certain permissions were shown a "forbidden access"
 FIX [ bug #3426 ] Unable to create an invoice from a contract with extrafields
 FIX [ bug #3431 ] Invoice bank account is not respected
 FIX [ bug #3432 ] Spaces should be removed from IBAN when formatting it
+FIX [ bug #3358 ] Tasks box does not work with PostgreSQL
 
 NEW: Created new ContratLigne::insert function
 
diff --git a/htdocs/core/boxes/box_task.php b/htdocs/core/boxes/box_task.php
index b0070e2a4f33a686242c2957959dfcd21484e1fb..815db7daefbef8ec8031197ee3c245e2f66cb9eb 100644
--- a/htdocs/core/boxes/box_task.php
+++ b/htdocs/core/boxes/box_task.php
@@ -80,7 +80,7 @@ class box_task extends ModeleBoxes
 
 			$sql = "SELECT pt.fk_statut, count(pt.rowid) as nb, sum(ptt.task_duration) as durationtot, sum(pt.planned_workload) as plannedtot";
 			$sql.= " FROM ".MAIN_DB_PREFIX."projet_task as pt, ".MAIN_DB_PREFIX."projet_task_time as ptt";
-			$sql.= " WHERE DATE_FORMAT(pt.datec,'%Y') = ".date("Y")." ";
+			$sql.= " WHERE DATE_FORMAT(pt.datec,'%Y') = '".date("Y")."' ";
 			$sql.= " AND pt.rowid = ptt.fk_task";
 			$sql.= " GROUP BY pt.fk_statut ";
 			$sql.= " ORDER BY pt.fk_statut DESC";