I want to retrieve data from a particular date from Firebase
. They are stored in the following format:
I am using a datePicker
to choose a date. But I am not able to figure out how I can change the date chosen to the above format.
For example: I choose a date say 28th March 2018
. I would use the code:
int day = datePicker.getDayOfMonth();
String month = datePicker.getMonth() + "";
String year = datePicker.getYear() + "";
But I am not able to figure out how to change it to the following format, Wed Mar 28 2018 00:00:00 GMT+530 (IST)