Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- \Bitrix\Main\Loader::includeModule('sale');
- $from = new DateTime('03.10.2017 05:20:20');
- $to = new DateTime('11.10.2017 22:00:00');
- $arQueryParams = [
- 'select' => ['*'],
- 'filter' => [
- ['>=DATE_INSERT' => $from->format('d.m.Y H:i:s')],
- ['<=DATE_INSERT' => $to->format('d.m.Y H:i:s')]
- ]
- ];
- $obj = \Bitrix\Sale\Order::getList($arQueryParams);
- $result = [];
- while ($r = $obj->fetch()) {
- $result[] = $r;
- }
- print_r($result);
Add Comment
Please, Sign In to add comment