how to get date in android code example
Example 1: how to get system date in android
String date = new SimpleDateFormat("yyyy-MM-dd", Locale.getDefault()).format(new Date());
Example 2: code to get date and time in android
SimpleDateFormat.getTimeInstance().format(Date())