[Java] Transform currentTimeMillis to readable date format

Ref. stackoverflow: how-to-transform-currenttimemillis-to-a-readable-date-format

        SimpleDateFormat sdf = new SimpleDateFormat("MMM dd,yyyy HH:mm");
        Date date = new Date(System.currentTimeMillis());
        System.out.println("DateTime: " + sdf.format(date));
This entry was posted in Java and tagged . Bookmark the permalink.