I just started working on Postgres database and created few tables .For convenience initially, I used character varying(50) but now I want to change that to Date (dd/mm/yyyy) format.
I tried using this command
ALTER TABLE ip_role ALTER COLUMN event_dt TYPE date USING(event_dt::date);
ALTER TABLE ip_role ALTER COLUMN event_dt TYPE DATE using to_date(event_dt, 'DD/MM/YYYY');
Posted in S.E.F
via StackOverflow & StackExchange Atomic Web Robots
This Question have been answered
This post first appeared on Stack Solved, please read the originial post: here