Fetch only Date and Month from Date

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • naveenkongati
    New Member
    • Oct 2008
    • 52

    Fetch only Date and Month from Date

    Hi,
    How do we fetch only date and month from date column (Ex: 2008-11-10) in Mysql?

    Thanks
  • luttkens
    New Member
    • Jul 2007
    • 23

    #2
    Take a look at the DATE_FORMAT function. In your case it would be something like

    Code:
    SELECT DATE_FORMAT(DateField, '%Y-%m-%d') FROM table

    Comment

    Working...