How to solve postgresql ERROR: cannot cast type time without timezone to date
Channel:
Subscribers:
4,970
Published on ● Video Link: https://www.youtube.com/watch?v=N4dQ6kWLYAY
i get this error on postgresql :
ERROR: cannot cast type time without timezone to date
LINE 1: ... COLUMN tgl_disetujui TYPE date USING (tgl_disetujui:date);
-----
run this query to solve :
1) ALTER TABLE table_name ALTER COLUMN field_name TYPE timestamp with time time zone USING current_date + field_name;
2) ALTER TABLE table_name ALTER COLUMN field_name TYPE date USING (field_name::date);
see this video for details :)
Other Videos By Ambar Hasbiyatmoko
Tags:
error
postgresql
query
phppgadmin
field
convert
date
localhost
database
ubuntu
linux
browser
sql