android - Get date and time of device without any punctuation marks -
i want current time , date of device on android app, without punctuation marks.
i mean like:
05112016
,
1946
how can on android app?
edit 1#: question isn't duplicate, since answer in suggested duplicate isn't i'm asking. when run code answer , delete punctuation marks "nov52016101232" instead of want "05112016101232".
use simpledateformat achieve this.
//date simpledateformat sdf = new simpledateformat("ddmmyyyy", locale.english); sdf.format(new date()); //time simpledateformat sdf = new simpledateformat("hhmm", locale.english); sdf.format(new date());
Comments
Post a Comment