Hello, I have trouble in solving the following:
Currently Im using ServerValue.TIMESTAMP to store date inside Firebase Database, and I can easily retreving it as date via: new Date((long) dataSnapshot.getValue());
The problem is, when i wanted query by using 2 dates:
Query q = databaseReference.orderByChild("datePosted").startAt(x).endAt(y);
where y is current date/time, x is one month before y,
I can't assigned ServerValue.TIMESTAMP as y, since method don't accept Map.
I can't figure out how to modify ServerValue.TIMESTAMP in order to assign it to x.
I'm not really sure whats the data format for ServerValue.TIMESTAMP inside Firebase Database, they shows as long format though.
Can anyone suggest the possible way to query between 2 ServerValue.TIMESTAMPs?
Side note, I'm working on Android Studio.