Populate Date and Time into Textview from Firebase
问题 I created a listview with two textviews, i want to get the date and time specific to any data added to the database into the textview from firebase. Is there any method to achieve the aforementioned? Thanks. 回答1: You need to add another child to store the timestamp when saving the data. Your data structure should look something like this "data": { "id1": { "text": "some text", "timestamp": 1472861629000 }, "id2": { "text": "some text", "timestamp": 1472861629000 }, "..." } To save the