• Модуль: main
  • Путь к файлу: ~/bitrix/modules/main/lib/orm/fields/datefield.php
  • Класс: Bitrix\Main\ORM\Fields\DateField
  • Вызов: DateField::convertValueToDb
public function convertValueToDb($value)
{
	if ($value instanceof SqlExpression)
	{
		return $value;
	}

	try
	{
		return $value === null && $this->is_nullable
			? $value
			: $this->getConnection()->getSqlHelper()->convertToDbDate($value);
	}
	catch (ArgumentTypeException $e)
	{
		throw new ArgumentException(
			"Type error in `{$this->name}` of `{$this->entity->getFullName()}`: ".$e->getMessage()
		);
	}
}