Answers for "postgres year month"

SQL
2

get year from date postgres

SELECT EXTRACT(YEAR FROM column_date);
Posted by: Guest on June-01-2020
0

postgresql get last day of month

create function end_of_month(date)
returns date as
$$
select (date_trunc('month', $1) + interval '1 month' - interval '1 day')::date;
$$ language 'sql'
immutable strict;
Posted by: Guest on March-05-2021

Code answers related to "SQL"

Browse Popular Code Answers by Language