MySQL Date function current date curdate (), when year before last (Curdate ()), takes the date of years (date), takes the month of date (date)

Source: Internet
Author: User
Get System Current DateTime: Sysdate () Gets the system current date: Curdate () Gets the system current time: Curtime () Gets the year of the given date: yearly (date) Gets the month of the given date: month (date) A function that adds a time interval for the specified date: date_add (date,interval expr Unit) (1) query author's year of birth = year of birth = current year-author Age = Years (Curdate ())-Ages Note: Current date curdate (), when the year before (Curdate ()) (2) query displays author information for the latest published date in the first half of the month select * from authors where Year (ISBN) =year (curdate ()) And Month (ISBN) >7; this year, the year is the current year: Years (ISBN) =year (curdate ()) in the first half, the month is less than 7:month (ISBN) <7 Note: Flexible use years () month ()

MySQL Date function current date curdate (), when year before last (Curdate ()), takes the date of years (date), takes the month of date (date)

Related Article

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.