标签: android sqlite cursor datetimepicker
我在数据库中有一组时间,我想与计算机中的当前时间进行比较。如何完成请帮助我!!
答案 0 :(得分:3)
使用Date.before()或Date.compareTo()方法:
Date.before()
Date.compareTo()
Date now = new Date(); Date date = ... //obtain it from db here if (now.before(date)) { Log.d("date is in the future"); }