I am trying to retrieve time of my post from Firebase timestamp to the Feed activity through an Adapter and Viewholder. But, when I launch my app, it crashes. what could be the possible reason for that. Except that everything is working fine, I mean, Image Url and EditText data are retrieving safely. How to retrieve Time and display it in my feed. In the below code, the error is thrown at first line.
long millisecond = feed_list.get(position).getTimestamp().getTime();
String dateString = DateFormat.format("MM/dd/yyyy", new Date(millisecond)).toString();
holder.setTime(dateString);