Curdate () or current_date () returns the current date
Curtime () or Current_time () returns the current time
Date_add (date,interval int keyword) returns the date plus the result of the interval int (int must be formatted according to the keyword), such as: Selectdate_add (Current_date,interval 6 MONTH);
Date_format (DATE,FMT)
Formats date values according to the specified FMT format
date_sub (date,interval int keyword) returns the date plus the result of the interval int (int must be formatted according to the keyword), such as: Selectdate_sub (Current_date,interval 6 MONTH);
DAYOFWEEK (date) returns the day ordinal of the week represented by date (1~7)
DayOfMonth (date) Return date is the day of the one month (1~31)
DayOfYear (date) returns the day ordinal of a year (1~366)
Dayname (date) returns the weekday name of date, such as SELECT dayname (current_date);
From_unixtime (TS,FMT) formats UNIX timestamp TS According to the specified FMT format
HOUR (time) returns the hour value (0~23)
MINUTE (time) returns the minute value of time (0~59)
Month (date) returns the months value of date (1~12)
MONTHNAME (date) returns the month name of date, such as: SELECT MONTHNAME (current_date);
Now () returns the current date and time
QUARTER (date) Returns a date in the quarter of the year (1~4), such as Select QUARTER (current_date);
WEEK (date) Returns a date of the week ordinal of a year (0~53)
Year (date) returns the date of day (1000~9999)
MySQL common functions (time and date functions)