Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to get ParseObject's createdAt date as String?

How do I get the date from the ParseObject's createdAt column and convert it to a String in the DD-MM-YYYY format?

like image 515
drilonrecica Avatar asked Feb 20 '26 07:02

drilonrecica


1 Answers

You need to get the date from Parse like this:

Date date = object.getCreatedAt();

And then in the adapter or wherever you want:

DateFormat df = new SimpleDateFormat("dd-MM-yyyy");
String reportDate = df.format(date);
like image 184
Gjoko Bozhinov Avatar answered Feb 22 '26 19:02

Gjoko Bozhinov