postgresql trick by generate_series

select 

* 

from GENERATE_SERIES('2020-03-12'::timestamp, '2030-03-12'::timestamp, '6 month'::INTERVAL);

 

   generate_series   

---------------------

 2020-03-12 00:00:00

 2020-09-12 00:00:00

 2021-03-12 00:00:00

 2021-09-12 00:00:00

 2022-03-12 00:00:00

 2022-09-12 00:00:00

 2023-03-12 00:00:00

 2023-09-12 00:00:00

 2024-03-12 00:00:00

 2024-09-12 00:00:00

 2025-03-12 00:00:00

 2025-09-12 00:00:00

 2026-03-12 00:00:00

 2026-09-12 00:00:00

 2027-03-12 00:00:00

 2027-09-12 00:00:00

 2028-03-12 00:00:00

 2028-09-12 00:00:00

 2029-03-12 00:00:00

 2029-09-12 00:00:00

 2030-03-12 00:00:00

(21 rows)