How can I retrieve the month and day (mysql) of this field from the field stored in date format)

Source: Internet
Author: User
Ask how to retrieve the month and day (mysql) of this field from the field stored in date format. for example, if there is a birthday stored in, the query conditions can be found, but can I directly read 01 or 18 instead of using PHP for processing? ------ Solution ------------------ correct the answer just now. bi asks how to retrieve the month and day of this field from the field stored in date format (mysql)
For example, if there is a birthday that stores
You can check the query conditions, but can you directly read 01 or 18 instead of reading them and then process them using PHP?


------ Solution --------------------
Correct the answer. you do not need to quote the birthday quotation marks.
You can also
Select MONTH (birthday), DAYOFMONTH (birthday) from table where...
I have tested it, so that you can obtain the data you want.

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.