We can directly get date format from MySQL table by using date_format function of MySQL. Here we will not use any php side function to get date format. Here is the basic syntax to get the date format from MySQL table.
SELECT date_format( dt, '%m/%d/%Y %T' ) as my_date FROM dt_tb
Here dt_tb is the table name and dt is the field name. You can see the formatting is done like this 'm/%d/%Y %T' . This formatting we can change to display date in different formats . Here are some of the formats and different possible values.