Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
HEY,
I want to convert "0169af56d96c" from Hex to Dec and then to unix timestamp with java.
Thanks a lot.
I found the solution
//Input is the input row .
Long decimal = Long.parseLong(input,16);
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
String new_time = sdf.format(new Date(decimal));
I found the solution
//Input is the input row .
Long decimal = Long.parseLong(input,16);
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
String new_time = sdf.format(new Date(decimal));