选择日期为工作日的行

时间:2011-06-28 22:27:27

标签: sql sqlite

只有当datetime列是工作日时,SQLite才可以选择行吗?类似的东西:

SELECT * FROM data WHERE datetime IS_A_WEEKDAY

2 个答案:

答案 0 :(得分:1)

查看已经提出的问题:

sqlite return as day of week

答案 1 :(得分:1)

使用sqlite return as day of week中的信息,我就是这样解决的:

SELECT ..., CAST(strftime('%w', date_column) AS integer) AS dow FROM data WHERE dow >= 1 and dow <= 5;