// /Symfony/src/Vendor/Bundlename/Entity/Example.php

/**
* @ORM\Column(type="datetime", nullable=true)
*/
private $date;

/**
* __toString()
*
* @return string
*/
public function __toString()
{
if ($this->getDate()) {
$somedate = $this->getDate()->format('Y-m-d H:i:s');
}

return ($somedate) ? : '';
}

/**
* Set date
*
* @param \DateTime $date
* @return Reminder
*/
public function setDate($date)
{
$this->date = $date;
return $this;
}

/**
* Get date
*
* @return \DateTime
*/
public function getDate()
{
return $this->date;
}