Solved

select only date and mont mysql

Posted on 2011-09-10
2
380 Views
Last Modified: 2012-06-27
I have column birthday how can i select only day and month  dd/mm  I donot want year sql state ment on mysql
0
Comment
Question by:teera
2 Comments
 
LVL 143

Accepted Solution

by:
Guy Hengel [angelIII / a3] earned 250 total points
ID: 36516010
0
 
LVL 7

Assisted Solution

by:Kishan Zunjare
Kishan Zunjare earned 250 total points
ID: 36518659
To select date use following
SELECT DATE_FORMAT('2011-09-11 22:23:00', '%D');
Result =>11th

To select day use following
SELECT DATE_FORMAT('2011-09-11 22:23:00', '%W');
Result =>Sunday

To select Only Month use following
SELECT DATE_FORMAT('2011-09-11 22:23:00', '%M');
Result=>Septmeber

I hope this will work.

0

Featured Post

Resolve Critical IT Incidents Fast

If your data, services or processes become compromised, your organization can suffer damage in just minutes and how fast you communicate during a major IT incident is everything. Learn how to immediately identify incidents & best practices to resolve them quickly and effectively.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

'Between' is such a common word we rarely think about it but in SQL it has a very specific definition we should be aware of. While most database vendors will have their own unique phrases to describe it (see references at end) the concept in common …
Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…

679 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question