2

我正在使用姿势,并且在使用以下选择代码时收到错误消息“类型时间戳与时区的输入语法无效”:

SELECT * FROM public."table1" WHERE 'registrationTimestamp' BETWEEN 
to_timestamp('22-10-2013 00:00', 'DD-MM-YYYY HH24:MI')
AND to_timestamp('22-10-2013 23:59', 'DD-MM-YYYY HH24:MI')**

registrationTimestamp时间戳格式如下:

6/26/2012  6:43:10 PM
4

1 回答 1

1

撇号的使用有误

应该

SELECT * FROM public."table1" 
 WHERE "registrationTimestamp" BETWEEN 
            to_timestamp('22-10-2013 00:00', 'DD-MM-YYYY HH24:MI')
        AND to_timestamp('22-10-2013 23:59', 'DD-MM-YYYY HH24:MI')
于 2013-10-30T12:11:49.477 回答