php - Formatting a date retrieved from SQL -


i retrieving date mysql database in php using current timestamp.

i output: 2015-09-29 17:51:35

i expect output: 29-september-2015

with sql use date_format() function disered output

select date_format(now(), '%d-%m-%y') 

or php, date()

<?php  $str = '2015-09-29 17:51:35'; echo date('d-f-y'); 

Comments

Popular posts from this blog

1111. appearing after print sequence - php -

excel - I can't get the attachement of the email PHP -

node.js - Express and Redis - If session exists for this user, don't allow access -