I wrote the following code
Date d = new Date(); CharSequence s = DateFormat.format(\"MMMM d, yyyy \", d.getTime());
But is asking me para
public String giveDate() { Calendar cal = Calendar.getInstance(); SimpleDateFormat sdf = new SimpleDateFormat("EEE, MMM d, yyyy"); return sdf.format(cal.getTime()); }