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

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)