when converting text/string to date in postgres, random date is generated
Clash Royale CLAN TAG #URR8PPP when converting text/string to date in postgres, random date is generated I have a text column indicating date i.e. 20170101 UPDATE table_name SET work_date = to_date(workdate, 'YYYYMMDD'); I used this command to convert it as date. However, I got a odd result. I read though other existing posts but not sure what's wrong here. +----------+---------------+ | workdate | work_date | +----------+---------------+ | 20170211 | 2207-05-09 | | 20170930 | 2209-04-27 | | 20170507 | 2208-02-29 | | 20170318 | 2207-08-24 | +----------+---------------+ Is that table is your expected result? – Prashant Pimpale 1 hour ago Works for me: imgur.com/a/uEkIaeh – a_horse_with_no_name 54 mins ago ...