Solved

select only date and mont mysql

Posted on 2011-09-10
2
373 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 142

Accepted Solution

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

Assisted Solution

by:Kishan Zunjare
Kishan Zunjare earned 250 total points
Comment Utility
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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Occasionally there is a need to clean table columns, especially if you have inherited legacy data. There are obviously many ways to accomplish that, including elaborate UPDATE queries with anywhere from one to numerous REPLACE functions (even within…
Composite queries are used to retrieve the results from joining multiple queries after applying any filters. UNION, INTERSECT, MINUS, and UNION ALL are some of the operators used to get certain desired results.​
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

771 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now