postgresql how use date code example
Example 1: postgresql get date from datetime
SELECT DATE(column_name) FROM table_name;
Example 2: create a date list in postgresql
select i::date from generate_series('2012-06-29',
'2012-07-03', '1 day'::interval) i