I have a value in miliseconds 1601626934449
Which generated via https://docs.oracle.com/javase/7/docs/api/java/lang/System.html#currentTimeMillis()
but can I somehow be able to get time in human readable format, or in brief I need to be able to know what the value in miliseconds 1601626934449 is ?
Use
java.timeon Java 8 or higher. Using that, it's easy to reach your goal.You basically create an
Instantfrom the epoch milliseconds (which represent a moment in time), make it aZonedDateTimeby applying aZoneId(my system's default in the following example) and then either format the outputStringby a built-inDateTimeFormatteror by creating a custom one with a desired pattern to make it as human-readable as required.Here's an example:
which outputs (on my system)