因为sqlite为弱引用,使用字段前将他强制转为日期型,用datetime.或者最原始的 strftime. SELECT distinct ID from testTable where datetime(availDate) between datetime('2015-01-12 04:00') and datetime('2015-01-13 00:00'); SQLite日期时间函数 SQLite支持以下五个日期时间函数: date(timestring, modifier, modi
import java.text.*; import java.util.Calendar; public class VeDate { /** * 获取现在时间 * * @return 返回时间类型 yyyy-MM-dd HH:mm:ss */ public static Date getNowDate() { Date currentTime = new Date(); SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd
1.inner join ,left join 与 right join (from 百度知道) 例表aaid adate1 a12 a23 a3表bbid bdate1 b12 b24 b4 (1)两个表a,b相连接,要取出id相同的字段 select * from a inner join b on a.aid = b.bid 此时的取出的是:1 a1 b12 a2 b2 (2)left join 指:select * from a left jo