Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

How to convert timestamp to time in java

//Timestamp to HH:mm:ss format
Long Timestamp = 1633304782;
Date timeD = new Date(Timestamp * 1000);
SimpleDateFormat sdf = new SimpleDateFormat("HH:mm:ss");

String Time = sdf.format(timeD);

//RESULT this code convert 1633304782 to 05:46:33
 
PREVIOUS NEXT
Tagged: #How #convert #timestamp #time #java
ADD COMMENT
Topic
Name
3+6 =