casting - Change data type varchar to timestamp along with null values in PostgreSQL -
change data type varchar timestamp along null values in postgresql have column empty rows , few timestamp rows. how convert timestamp data type in postgresql?
you need using clause turn empty strings null.
alter table ... alter column mycol type timestamp using (...conversion expression...) without seeing input data it's hard expression must be, involves nullif or case expressions , to_timestamp function and/or cast timestamp.
Comments
Post a Comment