PHP convert separate date and time strings into single datetime -


i have 2 separate strings date , time formatted like: 14/04/2014 , 01:15 pm

i convert these datetime formatted y-m-d h:i:s

any idea how go this??

$date = datetime::createfromformat('d/m/y h:i a', '14/04/2014'.' '.'01:15 pm'); echo $date->format('y-m-d h:i:s'); 

demo


Comments

Popular posts from this blog

javascript - How to name a jQuery function to make a browser's back button work? -

python - Django-easy-pdf: xhtml2pdf reporting reportlab 2.2+ is required, but 3.0 installed -

collision detection - C++ library for mesh to mesh intersection: what is available? -