Android sqlite日期存储
SQLite日期类型是以TEXT、REAL和INTEGER类型分别不同的格式表示的,对应如下:
TEXT: "YYYY-MM-DD HH:MM:SS.SSS"
REAL: 以Julian日期格式存储
INTEGER: 以Unix时间形式保存数据值,即从1970-01-01 00:00:00到当前时间所流经的秒数。
select * from on_work_attendance where attend_time between datetime('2012-08-1600:00:00') and datetime('2012-08-17 00:00:00');
select * from on_work_attendance where datetime(dateattend_time) >=datetime('2012-08-16') and datetime(attend_time) <= datetime('2012-08-17')
select * from on_work_attendance where strftime('%Y-%m-%d',dateattend_time) >= '2012-08-16' and strftime('%Y-%m-%d',attend_time) <= '2012-08-17'