title: How to render a DateTime object in a Twig template
body: <p>One of my fields in one of my entities is a "datetime" variable.</p>
  
  <p>How can I convert this field into a string to render in a browser?</p>
  
  <p>Here is a code snippet:</p>
  
  <pre><code>{% for game in games %}
      ...
          &lt;td&gt; {{game.gameTeamIdOne.teamName}} &lt;/td&gt;
          &lt;td&gt; {{game.gameTeamIdTwo.teamName}} &lt;/td&gt;
          &lt;td&gt; {{game.gameDate}}&lt;/td&gt;
      &lt;/tr&gt;
  {% endfor %}
  </code></pre>
  
  <p>Here is the variable in my entity class:</p>
  
  <pre><code>/**
   * @var date $gameDate
   *
   * @ORM\Column(name="GAME_DATE", type="datetime", nullable=true)
   */
  private $gameDate;
  </code></pre>
  
  <p>And here is the error message I am getting:</p>
  
  <blockquote>
    <p>An exception has been thrown during the rendering of a template ("Catchable Fatal Error:      Object of class DateTime could not be converted to string in ...\app\cache\dev\twig\9b\ad\58fd3bb1517632badf1fdc7fa4a8.php line 33") in "BeerBundle:Games:gameTable.html.twig" at line 10.</p>
  </blockquote>