这个小于日期的查询有什么问题?

时间:2022-06-01 21:02:41
sqlite> SELECT * FROM RawResponseTimes WHERE CreationTime <= 2011-06-14 17:17:23;
Error: near ":17": syntax error

Everything appears to be fine but it isn't happy with the hour 17, what gives?

一切似乎都很好,但却不满意17时,是什么给予?

Using SQLite.

使用SQLite。

3 个解决方案

#1


22  

Keep data value in single quotes...

将数据值保持在单引号中……

sqlite> SELECT * FROM RawResponseTimes WHERE CreationTime <= '2011-06-14 17:17:23';

sqlite>从CreationTime <= '2011-06-14 17:17:23'的RawResponseTimes中选择*;

#2


28  

Looks like you are missing 's from your date.

看来你错过了约会的机会。

SELECT * FROM RawResponseTimes WHERE CreationTime <= '2011-06-14 17:17:23';

选择* FROM RawResponseTimes,其中CreationTime <= '2011-06-14 17:17:23';

#3


0  

SELECT * FROM RawResponseTimes WHERE CreationTime <= CONVERT(DATETIME, '2011-06-14 17:17:23');

#1


22  

Keep data value in single quotes...

将数据值保持在单引号中……

sqlite> SELECT * FROM RawResponseTimes WHERE CreationTime <= '2011-06-14 17:17:23';

sqlite>从CreationTime <= '2011-06-14 17:17:23'的RawResponseTimes中选择*;

#2


28  

Looks like you are missing 's from your date.

看来你错过了约会的机会。

SELECT * FROM RawResponseTimes WHERE CreationTime <= '2011-06-14 17:17:23';

选择* FROM RawResponseTimes,其中CreationTime <= '2011-06-14 17:17:23';

#3


0  

SELECT * FROM RawResponseTimes WHERE CreationTime <= CONVERT(DATETIME, '2011-06-14 17:17:23');