Feb 04, 2022
I am going to explain you example of mysql get day short name from date example. You will learn How to get the short day name from a date in MySQL?. DATE_FORMAT '%a' for short day name in SQL query.
In MySQL, you can use the DATE_FORMAT() function with the %a format specifier to return the short day name. For example, you can return Sun or Mon instead of Sunday or Monday.
You can use from MySQL to display day short name from date. I will give you simple query to getting data get the short day name from table.
Let's see example here:
Table : users
Solution SQL Query:
DATE_FORMAT(created_at, '%a') as day_name
I hope it will help you...