Skip to content
Snippets Groups Projects
Commit 65ec02ba authored by Florian Henry's avatar Florian Henry
Browse files

FIX : [ bug #1913 ] [EXPORT] [PGSQL] Bug when filtering export on a

specific year
parent d0e4d804
No related branches found
No related tags found
No related merge requests found
......@@ -328,7 +328,7 @@ class Export
function conditionDate($Field, $Value, $Sens)
{
// TODO date_format is forbidden, not performant and not portable. Use instead BETWEEN
if (strlen($Value)==4) $Condition=" date_format(".$Field.",'%Y') ".$Sens." ".$Value;
if (strlen($Value)==4) $Condition=" date_format(".$Field.",'%Y') ".$Sens." '".$Value."'";
elseif (strlen($Value)==6) $Condition=" date_format(".$Field.",'%Y%m') ".$Sens." '".$Value."'";
else $Condition=" date_format(".$Field.",'%Y%m%d') ".$Sens." ".$Value;
return $Condition;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment