I am new to Stack Overflow. So please guide me if my question is not clear to you.
I have a datetime such as 2016-10-08 11:02:55.
I need to convert it into like this 8 OCT 2016.
You need to use strtotime() to convert target string to time and use date() to convert time to formated date. Also strtoupper() convert all character to uppercase.
$x = "2016-10-08 11:02:55";
echo strtoupper(date("j M Y",strtotime($x)));
8 OCT 2016