mysql - DATE_SUB return date in specif format -


part of sql query

date_sub(dstartdate,interval 30 day) dearlybirdexipirydate 

it return dearlybirdexipirydate 2013-05-16

but want in 16 may, 2013 format.

what changes should make in query this?

use date_format() function:

select date_format( date_sub(dstartdate, interval 30 day)                    , '%d %m, %y'                   )  dearlybirdexipirydate; 

see sqlfiddle


Comments

Popular posts from this blog

php - mySql Join with 4 tables -

css - Text drops down with smaller window -

c# - DetailsView in ASP.Net - How to add another column on the side/add a control in each row? -