set date&time adroid studio code example
Example: how to get system date in android
String date = new SimpleDateFormat("yyyy-MM-dd", Locale.getDefault()).format(new Date());
String date = new SimpleDateFormat("yyyy-MM-dd", Locale.getDefault()).format(new Date());