SELECT lastmoddate
, to_timestamp(lastmoddate,'DD-MON-YYYY HH:MI:SS:FF AM')
, cast(current_timestamp - interval '60' day as TIMESTAMP)
FROM table
WHERE primaryKeyColumn = 12141969;
возвращает:
SELECT problemid
, lastmoddate
, to_timestamp(lastmoddate,'DD-MON-YYYY HH:MI:SS:FF AM')
, cast((current_timestamp - 60) as TIMESTAMP)
FROM table
WHERE primaryKeyColumn = 12141969
and to_timestamp(lastmoddate,'DD-MON-YYYY HH:MI:SS:FF AM') < cast((current_timestamp - 60) as TIMESTAMP);
возвращает:
Я не понимаю, как 25 августа меньше, чем 19 августа.