I am using following code to display date and time:
String currentDateTime =java.text.DateFormat.getDateTimeInstance().format(Calendar.getInstance().getTime());
textViewDay.setText(currentDateTime);
I am getting date and time in format
Sep 17,2012 1:24:31 PM
I don’t want to display the second’s in output,so how yo get the output in following format
Sep 17,2012 1:24 PM
thanks in advance 🙂
you have to use a
SimpleDateFormat:with this pattern: