C
C
chopik252022-01-05 21:07:46
SQL
chopik25, 2022-01-05 21:07:46

How to get only the year from a date?

The table has a column with the publication date 2022-01-01 22:08:43. How to get only a year?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Stalker_RED, 2022-01-05
@Stalker_RED

SELECT id, YEAR(colName) FROM tblName

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question