using insert() method to insert DateTime value with PHP Doctrine\DBAL 2
$DB->insert('table_name', [ 'foo' => 'foo', 'bar' => 17, 'field' => new \DateTime(),], [ PDO::PARAM_STR, PDO::PARAM_INT, 'datetime',]);
Did the trick! ))
$DB->insert('table_name', [ 'foo' => 'foo', 'bar' => 17, 'field' => new \DateTime(),], [ PDO::PARAM_STR, PDO::PARAM_INT, 'datetime',]);
Did the trick! ))