[Solved] How to convert Object as timestamp to formatted date [closed]
Assuming you have a string that represents epoch time in seconds (as you have not told us what your Object actually is), first convert it to a long: long epoch = Long.parseLong(“1395500668”); You’ll then need to convert it to milliseconds: epoch *= 1000; Then you can convert it to a java.util.Date using the Date constructor … Read more