I wrote the following code
Date d = new Date(); CharSequence s = DateFormat.format(\"MMMM d, yyyy \", d.getTime());
But is asking me para
This is nothing to do with android as it is java based so you could use
private String getDateTime() { DateFormat dateFormat = new SimpleDateFormat("yyyy/MM/dd HH:mm:ss"); Date date = new Date(); return dateFormat.format(date); }