I have value String "2016-02-27T00:49:18.5594825+11:00" , I want to convert to format Milliseconds. But I its not work. this may code:
public static long converStringtoMS(String d) {
SimpleDateFormat sdf = new SimpleDateFormat("MM.dd.yyyy");
long a = 0;
try {
Date date = sdf.parse(d);
a=date.getTime();
} catch (ParseException e) {
e.printStackTrace();
}
return a;
}
But this is always 0, SO How to the right code?