Answer the question
In order to leave comments, you need to log in
How to get records for a specific date?
Actually, I need to get the number of records for a certain date, for example, for today: 02/24/2016
As soon as I didn’t try, it doesn’t work, now I’m trying like this:
$count_today = CIBlockElement::GetList([], [
'IBLOCK_ID' => 12,
'>=DATE_ACTIVE_FROM' => '24.02.2016 00:00:00',
'<=DATE_ACTIVE_FROM' => '24.02.2016 00:00:00'
], [], false, []);
Answer the question
In order to leave comments, you need to log in
I solved the issue by adding to the filter:
">=DATE_CREATE" => date('d.m.Y H:i:s', mktime(0,0,0,date('m'),date("d"),date("Y"))),
"<=DATE_CREATE" => date('d.m.Y H:i:s', mktime(0,0,0,date('m'),date("d")+1,date("Y"))),
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question