Date_add (Date,interval expr type)
| Types (Type) |
Expr parameter format |
Description |
| Microsecond |
Numeric type |
With subtlety as the unit of calculation |
| SECOND |
Numeric type |
The unit of measure in seconds |
| MINUTE |
Numeric type |
Counting units in minutes |
| HOUR |
Numeric type |
The unit of calculation in hours |
| Day |
Numeric type |
In days as the unit of calculation |
| WEEK |
Numeric type |
Week as the unit of calculation |
| MONTH |
Numeric type |
Month as the unit of calculation |
| QUARTER |
Numeric type |
Quarter as the unit of calculation |
| Year |
Numeric type |
Year as the unit of calculation |
| Second_microsecond |
String type, formatted as ' Second-microsecond or Second.microsecond or Second/microsecond ' |
|
| Minute_microsecond |
String type, formatted as ' Minute-microsecond or Minute.microsecond or Minute/microsecond ' |
|
| Minute_second |
String type, formatted as ' Minuter-second or Minute.second or Minute/second ' |
|
| Hour_microsecond |
String type, formatted as ' Hour-microsecond or Hourmicrosecond or Hour/microsecond ' |
|
| Hour_second |
String type, formatted as ' Hour-second or Hour.second or Hour/second ' |
|
| Hour_minute |
String type, formatted as ' Hourr-minute or Hour.minute or Hour/minute ' |
|
| Day_microsecond |
String type, formatted as ' Day-microsecond or Day.microsecond or Day/microsecond ' |
|
| Day_second |
String type, formatted as ' Day-second or Day.second or Day/second ' |
|
| Day_minute |
String type, formatted as ' Day-minute or Day.minute or Day/minute ' |
|
| Day_hour |
String type, formatted as ' Day-hour or day.hour or Day/hour ' |
|
| Year_month |
String type, formatted as ' year-month or year.month or Year/month ' |
|
The use of the MySQL Date_add () function