title: Getting errors on declaring date in symfony
body: <p>How to declare date and time in symfony? When I declare them, it is giving me errors like expecting date while declaring string and all. Please provide the correct format for date.</p>
  
  <p>This is what I did:</p>
  
  <pre><code>$time = "09:11";
  $date = "22-07-2019"
  
  $entity = new Entity();
  $entity-&gt;setDate(new \DateTime($date));
  $entity-&gt;setTime($time);
  </code></pre>