android how to get system time code example
Example 1: android java get current time
import java.time.*;
LocalDateTime datetime = LocalDateTime.now();
Example 2: how to get system date in android
String date = new SimpleDateFormat("yyyy-MM-dd", Locale.getDefault()).format(new Date());