Suppose I have a column that has the datatype Timestamp without Time Zone and looks like this:
Sun Jan 01 1933 00:00:00 GMT+0000 (Coordinated Universal Time)
I want to change it to a simple date like this 01/01/1933.
I have tried the following, but there is no change in the output:
SELECT timestamp_date::date as new_date,
DATE(timestamp_date) as also_date
FROM my_schema.my_table;
What am I doing wrong here?
1993-01-1See here ISO 8601 for more information.Sun Jan 01 1933 00:00:00 GMT+0000 (Coordinated Universal Time)is not valid in Postgres:select 'Sun Jan 01 1933 00:00:00 GMT+0000 (Coordinated Universal Time)'::timestamp; ERROR: invalid input syntax for type timestamp: "Sun Jan 01 1933 00:00:00 GMT+0000 (Coordinated Universal Time)"