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 -

java - WARN : org.springframework.web.servlet.PageNotFound - No mapping found for HTTP request with URI [/board/] in DispatcherServlet with name 'appServlet' -

Ruby on Rails, ActiveRecord, Postgres, UTF-8 and ASCII-8BIT encodings -