strd1.Format("%d-%d-%d",m_t1.GetYear(),m_t1.GetMonth(),m_t1.GetDay());
strd2.Format("%d-%d-%d",m_t2.GetYear(),m_t2.GetMonth(),m_t2.GetDay());
CString str="select * from 表名 where 字段名 between '"+strd1+"' and '"+strd2+"'";
SQLite does not have a storage class set aside for storing dates and/or times. Instead, the built-in Date And T……
[/Quote]
在sqlite命令行里面做验证,验证过了可实现,用的是具体日期能实现。但就是在C++中的SQL语句转换处,(日期是根据控件选择)转换不到日期显示的样子,无法进行查看。
SQLite does not have a storage class set aside for storing dates and/or times. Instead, the built-in Date And Time Functions of SQLite are capable of storing dates and times as TEXT, REAL, or INTEGER values:
* TEXT as ISO8601 strings ("YYYY-MM-DD HH:MM:SS.SSS").
* REAL as Julian day numbers, the number of days since noon in Greenwich on November 24, 4714 B.C. according to the proleptic Gregorian calendar.
* INTEGER as Unix Time, the number of seconds since 1970-01-01 00:00:00 UTC.