I am trying the
code
Date today = new
Date();
Date todayWithZeroTime;
{
try {
todayWithZeroTime = formatter.parse(formatter.format(today));
} catch
(ParseException e) {
e.printStackTrace();
}
}
String date =
todayWithZeroTime.toString();
it
is giving output :- Wed Dec 11 00:00:00 IST 2019
where I want
11/12/2019
where 11/12/2019 is today's date
No comments:
Post a Comment