I would like to change only the date part while retaining the time part untouched on postgresql datetime column?
2019-09-02 10:00:00
to
2019-10-26 10:00:00
You don't specify the logic you want to use. If you want to add or subtract an interval, you can use:
select '2019-09-02 10:00:00'::timestamp + interval '1 month 24 day'
If you want to directly specify the second date:
select '2019-10-26'::timestamp + ('2019-09-02 10:00:00'::timestamp)::time
select '2019-09-02 10:00:00'::timestamp + '54 days'::interval;