Status
Done
Text
This section explains the functions that allow you to retrieve the current date, time, or both.
Section 5. Extracting Date & Time Functions
The extraction functions allow you to extract date and time components from a date and time.
- DATE() – Extract the date component from a date.
- EXTRACT() – Extract a component of a date.
- YEAR() – Return the year component of a date.
- YEARWEEK() – Return the year and week for a date.
- QUARTER() – Return the quarter of the year for a date.
- MONTH() – Return the month component of a date.
- WEEK() – Return the week component of a date.
- WEEKDAY() – Return the weekday index of a date.
- WEEKOFYEAR() – Return the calendar week of the date (1-53) – equivalent to WEEK(date, 3).
- DAY() – Return the day of the month for a specific date (1-31). DAYOFMONTH is the synonym for DAY.
- DAYOFYEAR() – Return the day of the year (1-366).
- DAYOFWEEK() – Return the day of the week (1-7).
- HOUR() – Return the hour for a time.
- MINUTE() – Return the minute for a time.
- SECOND() – Return the second for a time.
- LAST_DAY() – Return an integer that represents the last day of the month for a specific date.
‣
MySQL DATE() Function
‣
MySQL EXTRACT() Function
‣
MySQL YEAR() Function
‣
MySQL YEARWEEK() Function
‣
MySQL QUARTER() Function
‣
MySQL MONTH() Function
‣
MySQL WEEK() Function
‣
MySQL WEEKDAY() Function
‣
MySQL DAY() Function
‣
MySQL DAYOFYEAR() Function
‣
MySQL DAYOFWEEK() Function
‣
MySQL HOUR() Function
‣
MySQL MINUTE() Function
‣
MySQL SECOND() Function
‣