java - How do I convert dateformat from Date to April 19th or April 22nd -
this question has answer here:
is there way convert date object string. example,
date date = ......... ;
date.tostring shows wed april 17 00:00:00.0 cest 2016"
and want display april 17th, removing informations.
use simpledateformat
:
string strdate = new simpledatformat("mmm dd").format(date);
as st/rd/th need add manually, e.g. doing if , appending strdate
.
Comments
Post a Comment