Query for change date format in php from mysql

How to change date format in php from mysql

Change date format in mysql

Solution

SELECT *, DATE_FORMAT( date, ‘%Y-%m-%d’ ) AS dateformat FROM tbl_demo;

Note :

 tbl_demo is a table name.
date is a field of tbl_demo table.

 

About the Author

avatar