Current Date in Android Studio

If you don’t need the date to update automatically, you can insert the current date as text. On the Insert tab, in the Text group, click Date & Time. In the Date and time dialog box, select the format you want and click OK. The date is inserted as text.
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)

Android java get current

import java.time.*;
LocalDate date =;
import java.time.*;
LocalDateTime datetime =;