如何在Sqlite中找到两个日期之间的中间点

我有这些日期:

html,body { height: 100%; width: 100%; } .col { background-color:red; } ,我需要这个"2019-01-01" and "2019-01-05"

如何在Sqlite上执行此操作? 我尝试了"2019-01-03",但这在SQLite中不起作用,此查询给出了以下错误:DateAdd(ms,DateDiff(ms,date1,date2),date1)/2

huage24 回答:如何在Sqlite中找到两个日期之间的中间点

sqlite不是mysql还是postgresql

This link将显示所有操作日期的功能。

您的问题的解决方案可以是:

 select datetime(strftime('%s','2019-01-01') + 
                   (strftime('%s','2019-01-05')-strftime('%s','2019-01-01'))/2,'unixepoch');
本文链接:https://www.f2er.com/3155613.html

大家都在问