Convert Date format into bigint format in postgresql How can I convert date format into bigint format in postgresql?
for eg: '2018-08-20' to '20180820'
postgres=# create table dttest ( dt date ) ;
CREATE TABLE
postgres=# insert into dttest values ( '2018-08-20' ) ;
INSERT 0 1
postgres=# select * from dttest;
     dt     
------------
 2018-08-20
(1 row)

postgres=# select to_char( dt, 'YYYYMMDD' ) from dttest ; 
 to_char  
----------
 20180820
(1 row)

postgres=# 


TO_CHAR and other date/time formatting is documented here.

Oh, and if you actually do want to cast to bigint:

select to_char( dt, 'YYYYMMDD' )::bigint from dttest ;