• Модуль: crm
  • Путь к файлу: ~/bitrix/modules/crm/lib/integration/report/handler/customers/regularcustomers.php
  • Класс: Bitrix\Crm\Integration\Report\Handler\Customers\RegularCustomers
  • Вызов: RegularCustomers::addTimePeriodToQuery
protected function addTimePeriodToQuery(Query $query, $timePeriodValue)
{
	if ($timePeriodValue['from'] !== "" && $timePeriodValue['to'] !== "")
	{
		$toDateValue = new DateTime($timePeriodValue['to']);
		$fromDateValue = new DateTime($timePeriodValue['from']);

		$query->whereBetween("MOVED_TIME", $fromDateValue, $toDateValue);
	}
}