Introduction
We use DATE_FORMAT and EXTRACT to get parts of dates or show dates in a way that is easy to understand.
When you want to show a date as 'day-month-year' instead of the default format.
When you need to find the year or month from a date to group or filter data.
When you want to display the time part of a date in a special way.
When you want to calculate how many days or months have passed since a date.
When you want to sort or compare dates by parts like year or day.