Conversion of a column from Integer format type to 'timestamp with time zone'

From: Raj kumar <rajkumar820999(at)gmail(dot)com>
To: Pgsql-admin <pgsql-admin(at)lists(dot)postgresql(dot)org>
Cc: Raj kumar <rajkumar820999(at)gmail(dot)com>
Subject: Conversion of a column from Integer format type to 'timestamp with time zone'
Date: 2023-01-26 19:45:37
Message-ID: CACxU--WR-nWB+gVGoTfrvYNb43HxzQNATW7HhSzkw291Qvifeg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Hi, there is a column 'created' in the 'customers' table which is actually
supposed to be a 'timestamp with time zone' column but stored in this
Integer format. How do I typecast this to 'timestamp with time zone' format?

select created from customers limit 3;
created
---------------
1521521848681
1508995056368
1521559994299
(3 rows)

Thanks,
Raj Kumar Narendiran.

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message David G. Johnston 2023-01-26 20:02:00 Re: Conversion of a column from Integer format type to 'timestamp with time zone'
Previous Message Massimo Ortensi 2023-01-26 14:31:46 Re: Problems with unique constraints