i have a String x = \"1086073200000\" . This is basically millisecond which I need to convert to a Date.
To convert i am using
DateFormat formatter
I tried this code and it worked for me
public static void main(String[] args) {
String x = "1086073200000";
long foo = Long.parseLong(x);
System.out.println(x + "\n" + foo);
Date date = new Date(foo);
DateFormat formatter = new SimpleDateFormat("dd/MM/yyyy");
System.out.println(formatter.format(date));
}