Problem retrieving dates from table Android

I have a small problem with a query:
user = ‘’ and farmName = ‘Farm1’ and rainDate >= ‘21-Nov-2018’ and rainDate <= '21-Nov-2018’
This is the whereClause
If I only want the data for the specific day (in this case the 21st of Nov) how would I do that?
In the Android app the user gives 2 dates. A start and end date. These are the 2 I entered. So if the user chooses the same date as begin and end, how would I display then only that date’s data?
seems as if the = sign is not applied in the clause

If I use this clause:
user = ‘’ and farmName = ‘Farm1’ and rainDate >= ‘21-Nov-2018’ and rainDate <= '24-Nov-2018’
It will also not send back the 21st’s data.

Generally speaking, to get the data for 21st of November you need to use this where clause:

rainDate >= 1542758400000 and rainDate <= 1542844800000

where the numbers correspong to timestamps in milliseconds of Nov, 21 00:00:00 and Nov, 22 00:00:00. Note that the dates should be in UTC because that’s how they’re stored in the database.

Great thanks! Worked perfectly!

For others reading this:

used java.util.Date

On the date object, use getTime() method to get it as a long value for milliseconds.