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

Popular posts from this blog

php - failed to open stream: HTTP request failed! HTTP/1.0 400 Bad Request -

java - How to filter a backspace keyboard input -

java - Show Soft Keyboard when EditText Appears -