I am getting date and time as 2017-01-15T21:30:05Z
from an API. I want to change the date to JAN 15,2017
and time to 9:30 pm
format.
Here is my code without formatting.
News currentNews = newsList.get(position);
String time=currentNews.getTime();
String[] parts=time.split("T");
parts[1]=parts[1].replace("Z","");
dateView.setText(parts[0]);
timeView.setText(parts[1]);