我有一个firestore
数据库,其中将com.google.firebase.Timestamp
存储在字段中,如何将com.google.firebase.Timestamp
转换为SQLite可存储数据,反之亦然,用于比较两个时间戳。
Timestamp fieldTimestamp = new Timestamp(new Date());
使用 .toDate(( 将时间戳转换为 Date((,也很容易比较 2 个日期对象。
Date(( 也存储在 SQLite 数据库中。希望它会有所帮助。