python - sqlite中查询小于等于当前日期的数据为什么查询的不对
黄舟
黄舟 2017-04-18 09:51:14
0
0
420

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

黄舟
黄舟

人生最曼妙的风景,竟是内心的淡定与从容!

répondre à tous(0)
Derniers téléchargements
Plus>
effets Web
Code source du site Web
Matériel du site Web
Modèle frontal
À propos de nous Clause de non-responsabilité Sitemap
Site Web PHP chinois:Formation PHP en ligne sur le bien-être public,Aidez les apprenants PHP à grandir rapidement!