Heim > Fragen und Antworten > Hauptteil
我想通过sql语句查询出sqlite数据库中Quan_time字段中小于或等于当前日期的数据,Quan_time字段中存储的是字符串日期,所以用cast()函数转换了下,但是查询出来的数据不对,请问是哪里问题,谢谢~!select * from api_coupon where cast(Quan_time as datetime)<=datetime('now','+8 hour');
sqlite
Quan_time
cast()
select * from api_coupon where cast(Quan_time as datetime)<=datetime('now','+8 hour');
Heim
Kurs
Fragen und Antworten
Mein