S
S
Sinner32022-04-04 16:30:59
1C-Bitrix
Sinner3, 2022-04-04 16:30:59

How to display items modified 5 minutes ago?

I can't figure out why I can't display items that have changed in the last 5 minutes?

$arSelect = Array("ID", "IBLOCK_ID", "NAME", "DATE_ACTIVE_FROM","PROPERTY_*","TIMESTAMP_X");
$arFilter = Array("IBLOCK_ID"=>$elementIdBlock, "ACTIVE_DATE"=>"Y", "ACTIVE"=>"Y", 'DATE_MODIFY_FROM' =>date($DB->DateFormatToPHP(FORMAT_DATETIME), time()-300));
$res = CIBlockElement::GetList(Array("SORT"=>"ASC"), $arFilter,  false, Array ("nTopCount" => 5), $arSelect);

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dmitry Bezmenov, 2022-04-04
@Sinner3

"DATE_MODIFY_FROM" => ConvertTimeStamp(time() - 300, "FULL")

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question