how to set current date in android studio

Solutions on MaxInterview for how to set current date in android studio by the best coders in the world

we are a community of more than 2 million smartest coders
registration for
employee referral programs
are now open
get referred to google, amazon, flipkart and more
register now
  
pinned-register now
showing results for - "how to set current date in android studio"
Manny
04 Sep 2016
1Calendar c = Calendar.getInstance();
2SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
3String strDate = sdf.format(c.getTime());
4Log.d("Date","DATE : " + strDate)