The use of the MySQL Date_add () function

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.