I have some dates like 20190101 (YYYYMMDD) and 201901 (YYYYMM) in a column called process_date
and I need two columns, a column called process_year
with the year (YYYY) and process_month
with the month (MM), when I use
date_part('year',process_date::numeric(8,0)) as process_year
the dates in format 201901 (YYYYMM) take the value '20' and same with
date_part('month',process_date::numeric(8,0)) as process_month
take the value '19' to the same format 201901 (YYYYMM)