Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in SQL by (55.6k points)

Can anyone explain how to get year from the date in SQL?

1 Answer

0 votes
by (119k points)

We can use YEAR() function to get the year from the date in SQL. Here is the syntax to get the year from the date in SQL:

SELECT YEAR (Date) as Year;

Here is the syntax to get the year from the current system date:

SELECT YEAR (CURDATE());

I recommend registering for this SQL training course by Intellipaat to learn SQL.

Related questions

0 votes
1 answer
asked Jul 22, 2019 in SQL by Tech4ever (20.3k points)
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer
asked Apr 22, 2020 in SQL by Sudhir_1997 (55.6k points)
0 votes
1 answer
asked Apr 21, 2020 in SQL by Sudhir_1997 (55.6k points)

Browse Categories

...