Why not just do (%Y
will give you the year part):
select DATE_FORMAT(inputDate, '%b-%Y') AS entryDate from `table`
Pergunta
Sample original value of inputDate
inputDate
2013-11-19
2013-11-20
2013-11-22
2013-12-04
i want the result to be return in:
Nov-2013
Nov-2013
Nov-2013
Dec-2013
im using the query as below to get the result.
SELECT CONCAT(DATE_FORMAT(inputDate, '%b'), '-' , YEAR(inpuDate)) AS entryDate FROM table
how to show the result at server side? i double check the datatype, and restore the data from server to my local. nothing helped. there is no 'NULL' value inside this field
Solução
Why not just do (%Y
will give you the year part):
select DATE_FORMAT(inputDate, '%b-%Y') AS entryDate from `table`