postgresql - PostgresSQL database has date field, I want all data but the date column as year only -
i have data has date column in full format output represent year.
eg: from
select * tablename;
i want like:
select * tablename 'newdatefield' select extract(year timestamp 'datefield');
i'm not great @ sql - remember can done can't find how again.
i think overthinking one:
select extract(year datefield), the, other, fields, you, want tablename
Comments
Post a Comment