I need to convert this time and date to this timestamp format :
2019/04/22 10:04:30 to 2019-02-21T14:10:18.161+0000
this is my code, it's not working, I miss something, right?
String isoDatePattern = "yyyy-MM-dd'T'HH:mm:ss.SSSZ";
SimpleDateFormat simpleDateFormat = new SimpleDateFormat(isoDatePattern);
Date d = null;
try {
d = simpleDateFormat.parse("2019/04/22 10:04:30");
}
catch (ParseException e) {
e.printStackTrace();
}
String dateString = simpleDateFormat.format(d);
Log.e("dateString ::::> ",dateString);