I have already researched a lot of site on how can I convert PHP DateTime object to String. I always see \"String to DateTime\" and not \"DateTime to String\"
PHP D
Shorter way using list. And you can do what you want with each date component.
list($day,$month,$year,$hour,$min,$sec) = explode("/",date('d/m/Y/h/i/s')); echo $month.'/'.$day.'/'.$year.' '.$hour.':'.$min.':'.$sec;