I want to insert a Date series into an existing table (public.test) in the column(day) starting from 2015-04-01 ,2015-04-02 ,.....to 2015-04-30.i know there is a generate series method in postgreSQL.But Can I generate dates using that or is there any other method to generate Dates?Any help is appreciated.
smth like
insert into public.test ("day")
select generate_series('2015-04-01'::date,'2015-04-30'::date,'1 day'::interval);
should work
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With