?
Solved

select only date and mont mysql

Posted on 2011-09-10
2
Medium Priority
?
391 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 143

Accepted Solution

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

Assisted Solution

by:Kishan Zunjare
Kishan Zunjare earned 1000 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

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Question has a verified solution.

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

When table data gets too large to manage or queries take too long to execute the solution is often to buy bigger hardware or assign more CPUs and memory resources to the machine to solve the problem. However, the best, cheapest and most effective so…
In this article, we’ll look at how to deploy ProxySQL.
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
Suggested Courses

719 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