Search from and to dates

private int billId;
    private String billDate;
    private Date billDateTimeStamp;
    private String customerName;
    private String billTotal;
    private String goodsReturn;
    private String netTotal;
    private String cashTen;
    private String gst_total;
    private String returnTotal;
    private String billTag;
    private RealmList<BillItem> billItems;

RealmResults<BillGenerateObject> object = realm.where(BillGenerateObject.class).between(BillGenerateObject.BILLDATE,from_date,to_date).equalTo(BillGenerateObject.BILLTAG, billType).findAll();

I am trying to fetch records via from and to dates from my realm object.
Above is my code.

But not getting any results. Is anything wrong with the code?

Thanks in advance


you should use billDateTimeStamp for between() query


Hi, Thanks fir the reply. Can you show it in my code? I am a newbie in using realm db.