问题描述
我想在recyclerview中按月显示数据, 我在 firestore db 中有一个字段为“delivery_Date”= Timestamp(ServerTimestamp)
我试图按月过滤,但它显示空的回收站
这是我在 Kotlin 中的代码
val docRef = db.collection("All Booking ID")
.whereEqualTo("driverId",auth.currentUser?.uid)
.whereEqualTo("status","Completed")
.whereGreaterThanOrEqualTo("delivery_Date","2021-02")
.whereLessThan("delivery_Date","2021-03")
.orderBy("delivery_Date")
val options : FirestoreRecyclerOptions<Service> = FirestoreRecyclerOptions.Builder<Service>()
.setQuery(docRef,Service::class.java)
.build()
adapterService = AdapterService(applicationContext,options,this@BarChartCompletedList)
adapterService?.notifyDataSetChanged()
recyclerViewServices.layoutManager = LinearLayoutManager(applicationContext)
recyclerViewServices.adapter = adapterService
recyclerViewServices.setHasFixedSize(true)
adapterService?.startListening()
谁能帮我整理一下时间戳字段中的结果... 谢谢!
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)