android - Display Date 1990-04-03 without alphabets -
i want display date 1990-04-03 instead fri apr 03 displayed
private static final string date_format = "yyyy-mm-dd"; string date=jmeminfo.getstring("dob"); simpledateformat sdf= new simpledateformat(date_format); date dob=sdf.parse(date);
the bottom line retrieving top
textdob.settext(string.valueof(info.getdob().tostring().substring(0,10)));
date
instant in time , has no inherent format (beyond tostring()
). format want can utilize dateformat
instance changing this
textdob.settext(string.valueof(info.getdob().tostring().substring(0,10)));
to dateformat.format(date)
like
textdob.settext(sdf.format(info.getdob()));
android
No comments:
Post a Comment