I have a field in database (Time) with this value 09:00:00.
I created the Entity and with Time Field
/**
* @var \DateTime
*
* @ORM\Column(name="m_01_ch", type="time")
*/
private $m_01_ch;
In my controller I retrieve the element and when I do:
$val = $myentity->getM01Ch();
My value is (in XDebug)
$val = {DateTime}[3]
date= "2015-07-08 09:00:00.000000"
timezone_type = 3
timezone "Europe/Rome"
If I get $val->date
I have All the Date, but I want to get only 09:00:00
Can I take my "original" value without use Regex etc?