I do not know what is wrong with code below -
public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layo
Calendar c = Calendar.getInstance(); SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); String formattedDate = df.format(c.getTime()); System.out.println("Currrent Date Time : "+formattedDate);