This is my code:
long currentTime = System.currentTimeMillis(); Date date = new Date(currentTime); // if you really have long String result = new SimpleDateF
String result = new SimpleDateFormat("HH:mm:ss:SSS").format(date); "HH:mm:ss:SSS" //SSS stands for milliseconds
Check SimpleDateFormat API for more info