Answer the question
In order to leave comments, you need to log in
How to filter items by modification date (bitrix, getList)?
I'm trying to add filtering by date
, the getList method, the value of DATE_MODIFY_FROM
, I don't know what's wrong, it seems like you just need to write the date, but it doesn't work,
probably the date is not written correctly?
other filters work fine
$arFilter = array("IBLOCK_ID" => array($category), "ACTIVE" => "N", "DATE_MODIFY_FROM" => '2021-08-02 00:00:00');
$res = CIBlockElement::GetList(array('id' => 'desc'), $arFilter, false, array("nPageSize" => 10), $arSelect);
Answer the question
In order to leave comments, you need to log in
If suddenly there is another person who has problems with registration, and stupid mistakes)
$arFilter = array(">DATE_CREATE" => date('01.05.2021'), ">TIMESTAMP_X" => date('01.08.2021'));
https://dev.1c-bitrix.ru/api_help/iblock/classes/c...
TIMESTAMP_X - by change time (Date filter);
DATE_MODIFY_FROM - by modification time. Items changed after the time specified in the filter will be selected. Time is indicated in the format of the site. It is possible to use the negation operator "!DATE_MODIFY_FROM";
DATE_MODIFY_TO - by modification time. Items changed before the time specified in the filter will be selected. Time is indicated in the format of the site. It is possible to use the negation operator "!DATE_MODIFY_TO";
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question