android how to get date time

www.lautt‮c.iru‬om
android how to get date time
Calendar c = Calendar.getInstance();
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
String strDate = sdf.format(c.getTime());
Log.d("Date","DATE : " + strDate)
Created Time:2017-09-15 21:32:51  Author:lautturi