How to extract only the year from the date in sql server 2008

0 votes
How to simply get the year from the date in SQL Server 2008 I need to extract the year from the date column in my database. Does that serve any purpose?
Sep 13 in Database by Kithuzzz
• 20,660 points
102 views

1 answer to this question.

0 votes

To obtain the year from the given date, use the year() function in SQL.

Syntax:

YEAR ( date )
answered Sep 15 by narikkadan
• 37,660 points

Related Questions In Database

0 votes
0 answers

How to create a table from select query result in SQL Server 2008

I tried to build a table from ...READ MORE

Sep 2 in Database by Kithuzzz
• 20,660 points
94 views
0 votes
0 answers
0 votes
0 answers

Convert date from dd-mm-yyyy to yyyy-mm-dd in SQL Server

Given date: DECLARE @Date1 VARCHAR(50) = '30-01-2015' I want ...READ MORE

Aug 18 in Database by Kithuzzz
• 20,660 points
2,417 views
0 votes
1 answer

What are the different authentication modes in SQL Server? How can it be changed?

Windows mode and Mixed Mode – SQL ...READ MORE

answered Oct 29, 2018 in Database by Sahiti
• 6,380 points
689 views
0 votes
0 answers

Calculate time difference in minutes in SQL Server

I require the minutes-based time difference between ...READ MORE

Aug 13 in Database by Kithuzzz
• 20,660 points
348 views
0 votes
0 answers

How can I select the first day of a month in SQL?

I only need to choose the given ...READ MORE

Aug 14 in Database by Kithuzzz
• 20,660 points
59 views
0 votes
0 answers

SQL query to insert datetime in SQL Server

Using the SQL query below, I want ...READ MORE

Aug 29 in Database by Kithuzzz
• 20,660 points
711 views
0 votes
0 answers

How to return only the Date from a SQL Server DateTime datatype

SELECT GETDATE() Returns: 2008-09-22 15:24:13.790 I want that date part ...READ MORE

Sep 6 in Database by Kithuzzz
• 20,660 points
90 views
0 votes
1 answer

How to execute function in SQL Server 2008

The function appears not to be being ...READ MORE

answered Sep 11 in Database by narikkadan
• 37,660 points
115 views
0 votes
1 answer

Login failed for user 'sa'. The user is not associated with a trusted SQL Server connection. (Microsoft SQL Server, Error: 18452) in sql 2008

Solution Go to Start > Programs > Microsoft SQL Server > Enterprise Manager. Right-click the SQL ...READ MORE

answered Sep 12 in Database by narikkadan
• 37,660 points
188 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP