0

I retrieved the date from firestore saved in the timestamp format like this:

        Date retrievedDate = class.getDate();

the date saved in firestore format: //it is in timestamp format

enter image description here

How to convert this date to a normal presentable format like : 7 June 2020, Sunday, 15:09 PM?

Thank you in advance.

Lionlollipop
  • 113
  • 3
  • 12
  • 2
    You should look into Android's date formatting capabilities. The user's most desirable format is going to depend on a bunch of things, including locale and timezone. https://developer.android.com/reference/android/text/format/DateFormat – Doug Stevenson Jun 27 '20 at 07:17
  • is your timestamp saved in firestore that is in milliseconds? – Noban Hasan Jun 27 '20 at 07:41
  • @NobanHasan No, it is saved in timestamp like the screenshot above – Lionlollipop Jun 27 '20 at 07:45
  • You can check out the link. This may help you to format your ZonedDatetime. https://howtodoinjava.com/java/date-time/parse-string-to-date-time-utc-gmt/ – Noban Hasan Jun 27 '20 at 08:04

0 Answers0