Converting timestamp is really simple to get the formatted date as you want. You just need to create a Calendar object and set your timestamp data on it.
Then you got the timestamp data into your calendar object and you can turn it as a string via “DateFormat.format” method.
Calendar cal = Calendar.getInstance(Locale.ENGLISH);cal.setTimeInMillis(timestamp);String date = DateFormat.format("dd-MM-yyyy hh:mm:ss", cal).toString();
Note: If your result always returns 1970, try this way :
Calendar cal = Calendar.getInstance(Locale.ENGLISH);
cal.setTimeInMillis(timestamp * 1000L);
String date = DateFormat.format("dd-MM-yyyy hh:mm:ss", cal).toString();