Reputation: 93
When i add a day to a date in postgres as below
SELECT '2018-08-20 00:00:00.0' + INTERVAL '1 DAY';
Getting below exception in pgAdmin4. Can any one help me here.
ERROR: invalid input syntax for type interval: "2018-08-20 00:00:00.0"
LINE 1: SELECT '2018-08-20 00:00:00.0' - INTERVAL '1 DAY';
Upvotes: 1
Views: 512
Reputation: 93
SELECT date '2018-08-20 00:00:00.0' - INTERVAL '1 DAY';
Solved the problem.
Upvotes: 1