How to solve postgresql ERROR: cannot cast type time without timezone to date

Subscribers:
4,970
Published on ● Video Link: https://www.youtube.com/watch?v=N4dQ6kWLYAY



Duration: 2:52
4,537 views
6


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


2017-12-02How to install apache, php, mysql & phpmyadmin on Ubuntu 16.04
2017-11-27Laravel 5.4 - How to upload file with laravel [part 6]
2017-11-26Sending mail from own domain with PHPMailer 5.2
2017-11-06Laravel 5.4 - How to using validation in laravel [part 5]
2017-10-28Laravel 5.4 Tutorial - How to using bootstrap v4 beta in laravel framework [part 4]
2017-10-26Laravel 5.4 error - The stream or file 'laravel.log' could not be .... Permission denied
2017-10-05Postgresql - Automatic Backup (.sql, .custom) with Cronjob in Centos 7
2017-09-23How to solve Ruby 2.4 : Failed to load libmysql.dll
2017-09-21How to solve : select2 jquery not work after clone
2017-09-21How to Install golang (go1.9) on Ubuntu 16.04
2017-09-03How to solve postgresql ERROR: cannot cast type time without timezone to date
2017-08-27Solve Apache (a2ensite) - ERROR: Site squirrelmail does not exist!
2017-08-26Solve ubuntu error - E: Package 'dovecot' has no installation candidate
2017-08-26Solve ubuntu error - dpkg was interrupted, you must manually run 'sudo dpkg --configure -a'
2017-08-19Mysql error - this is incompatible with sql_mode=only_full_group_by
2017-08-17Codeigniter(PHP) Error - mysqli: Headers and client library minor version mismatch.
2017-08-13Ubuntu server error - RTNETLINK answers: File exists, Failed to bring up enp0s8
2017-08-04Android Studio Error - app.MainActivity has leaked window com.android.internal.policy
2017-08-04Android Studio Error (Gradle) - Could not find method compile() for arguments [com.android.volley]
2017-07-20Laravel 5.2 error - [InvalidArgumentException] Please provide a valid cache path.
2017-07-12PHP error - SSL operation failed .. OpenSSL error:14090086:.. get serve:certificate verify failed



Tags:
error
postgresql
query
phppgadmin
field
convert
date
localhost
database
ubuntu
linux
browser
sql