I would like to convert yyyy/mm/开发者_如何学Cdd to dd/mm/yyyy format.So, I am using strtotime() function.but when I get zero date like(0000/00/00) from mysql. It will be showing wrong date like(01-01-1970).
I need exact string like 0000/00/00 to 00/00/0000. any other function are there?
Try MySQL's DATE_FORMAT() function
SELECT DATE_FORMAT(dateColumn,'%d/%m/%Y') AS dateColumn FROM table...
Try to use strftime
strftime("%d-%b-%Y", strtotime($value['your_date']));
精彩评论