Answer the question
In order to leave comments, you need to log in
How to filter value by date property?
trying to filter from the beginning of the month to the end
$curdate = "1.06.2016";//как пример
$lastdate = "31.06.2016";
$GLOBALS['ar2Filter'] = Array(
"ACTIVE" => "Y",
//">=DATA_SOBYTIYA" => $curdate,
"!PROPERTY" => array(
//">=DATA_SOBYTIYA" => $curdate,
'DATA_SOBYTIYA' => array(
//">=VALUE" => $curdate,'
VALUE' => false,
//"<=VALUE" => $lastdate)
//"<=DATA_SOBYTIYA" => $lastdate
),
//"<=DATA_SOBYTIYA" => $lastdate
);
Answer the question
In order to leave comments, you need to log in
You need to convert the date to the format stored in the database: YYYY-MM-DD.
Bitrix has some kind of monstrous crutch for this in the BD class (well, where else to format the date?), But I prefer to use the standard library of the language.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question