Formatting MYSQL date valueWe 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.
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.
You can read about data formatting in mysql query here Here is the sql code to create and fill the table with records
This article is written by plus2net.com team.
![]() ▼ More on Date & Time functions in SQL | ||||||||||
| ||||||||||