I wrote the following code
Date d = new Date(); CharSequence s = DateFormat.format(\"MMMM d, yyyy \", d.getTime());
But is asking me para
public static String getcurrentDateAndTime(){ Date c = Calendar.getInstance().getTime(); SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy/MM/dd"); String formattedDate = simpleDateFormat.format(c); return formattedDate; } // String currentdate= getcurrentDateAndTime();