How to convert date format from Android inbox sms
Try this:
Date date = new Date(cursor1.getLong(0));
String formattedDate = new SimpleDateFormat("MM/dd/yyyy").format(date);
It seems that you are receiving the date in miliseconds. To convert miliseconds into a Date object:
long milliSeconds = cursor1.getLong(0);
DateFormat formatter = new SimpleDateFormat("dd/MM/yyyy hh:mm:ss.SSS");
Calendar calendar = Calendar.getInstance();
calendar.setTimeInMillis(milliSeconds);
String finalDateString = formatter.format(calendar.getTime());