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
Post a Comment