MySQL DATE_FORMAT '%M' for short month?
27,790
DATE_FORMAT(date, '%d-%b-%y') AS Displaydate
Related videos on Youtube
Author by
user2574794
Updated on October 24, 2022Comments
-
user2574794 over 1 year
I'm trying to display dates like this
27-Jul-13
. I keep reading thatM
should give the shorthand month andF
the full name. I am using this:DATE_FORMAT(date, '%d-%M-%y') AS Displaydate
but it displays like this:
14-April-12
not14-Apr-12
Also if I use
F
it doesn't work at all, it just displays anF
where the month should be. What am I doing wrong?-
sroes over 10 years
DATE_FORMAT(date, '%d-%M-%y') AS Displaydate
is probablymysql
, notphp
-