how to convert timestamp to time in android studio

Solutions on MaxInterview for how to convert timestamp to time in android studio by the best coders in the world

showing results for - "how to convert timestamp to time in android studio"
Alan
09 Mar 2019
1//Timestamp to HH:mm:ss format
2Long Timestamp = 1633304782;
3Date timeD = new Date(Timestamp * 1000);
4SimpleDateFormat sdf = new SimpleDateFormat("HH:mm:ss");
5
6String Time = sdf.format(timeD);
7
8//RESULT this code convert 1633304782 to 05:46:33