title: Cannot save a DateTime object to a datetime field in MySQL
body: <p>Here is my database schema for my MySQL database:</p>
  
  <pre><code>create table noticia 
  (
      id int,
      imagen varchar(255),
      fecha datetime,
      titulo varchar(255),
      url varchar(255),
      descripcion varchar(255),
      contenido text
  ) 
  </code></pre>
  
  <p>I'm using RedBeanPHP as my ORM to save the information to a database. Here is where I'm scraping and parsing the dates to a <code>DateTime</code> object as per the <a href="http://nl3.php.net/manual/en/datetime.construct.php" rel="nofollow">documentation</a>.</p>
  
  <pre><code>foreach ($element-&gt;find('span.fechanoticia') as $fecha) {
     $tmp = str_replace("/", "-", $fecha-&gt;innertext);
     print_r($tmp);
  
     $dateFoo = new DateTime($tmp);
     echo $dateFoo-&gt;format('Y-m-d H:i:s');
  
     $newItem-&gt;set_fechanoticia($dateFoo);
  }
  </code></pre>
  
  <p>The <code>$tmp</code> variable this value for example:</p>
  
  <pre><code>05-09-2012
  </code></pre>
  
  <p>The <code>echo</code> call to format returns:</p>
  
  <pre><code>2012-09-05 00:00:00
  </code></pre>
  
  <p>Everything is peachy, and working.</p>
  
  <p>However when I try to save it to the database using RedBeanPHP I get this error:</p>
  
  <blockquote>
    <p>Fatal error: Uncaught exception 'RedBean_Exception_Security' with
    message 'Invalid Bean: property fecha ' in
    C:\xampp\htdocs\blog-uvm\rb.php:4880 Stack trace: #0
    C:\xampp\htdocs\blog-uvm\rb.php(5108):
    RedBean_OODB->check(Object(RedBean_OODBBean)) #1
    C:\xampp\htdocs\blog-uvm\rb.php(5082):
    RedBean_OODB->storeBean(Object(RedBean_OODBBean)) #2
    C:\xampp\htdocs\blog-uvm\rb.php(7005):
    RedBean_OODB->store(Object(RedBean_OODBBean)) #3
    C:\xampp\htdocs\blog-uvm\index.php(60):
    RedBean_Facade::store(Object(RedBean_OODBBean)) #4 {main} thrown in
    C:\xampp\htdocs\blog-uvm\rb.php on line 4880</p>
  </blockquote>
  
  <p>Can RedBeanPHP not handle datetime objects? </p>