SELECT to_char(t, 'yyyy-MM-dd')||' 00:00:00' bdate
,to_char(t, 'yyyy-MM-dd')||' 23:59:59' edate
from generate_series('2023-07-19'::TIMESTAMP ,'2023-08-20'::TIMESTAMP, '1 day') as t
order by bdate
SELECT to_char(t, 'yyyy-MM-dd')||' 00:00:00' bdate
,to_char(t, 'yyyy-MM-dd')||' 23:59:59' edate
from generate_series('2023-07-19'::TIMESTAMP ,'2023-08-20'::TIMESTAMP, '1 day') as t
order by bdate