How to get number of days in a given year?

Answers were Sorted based on User's Feedback



How to get number of days in a given year?..

Answer / sandhya

SELECT DATEDIFF(DD,HIREDATE,GETDATE())

Is This Answer Correct ?    1 Yes 0 No

How to get number of days in a given year?..

Answer / koppalahareesh

declare @y int;
set @y = 2016;

SELECT DATEDIFF(day,cast(@y as char(4)), cast(@y+1 as char(4))) Days

Is This Answer Correct ?    1 Yes 0 No

How to get number of days in a given year?..

Answer / dinesh rathod

would like to get the total number of days in a year left from the given

Is This Answer Correct ?    0 Yes 0 No

How to get number of days in a given year?..

Answer / pulak

select add_months(trunc(sysdate,'year'),12)-trunc(sysdate,'year') as days from dual;

Is This Answer Correct ?    1 Yes 3 No

Post New Answer

More SQL Server Interview Questions

Do you know what is raid and what are different types of raid configurations? : SQL Server Architecture

0 Answers  


Explain the new features of SQL server 2000?

1 Answers  


If there is failure during updation of certain rows, what will be the state?

2 Answers  


What is filestream?

0 Answers  


What are truncate options available in sql server? : sql server database administration

0 Answers  






Explain the truncate command?

0 Answers  


Give me a SQL Query to find out the second largest company?

0 Answers   Ernst Young,


What are different types of statements that are supported by sql?

0 Answers  


Plz tell about backup&recovery?

3 Answers  


What is autocommit mode in sql server?

0 Answers  


is it possible to use a variable in a query with the IN clause (a,b,c..z), without getting quotes or conversion errors?

2 Answers  


How many types of TRIGGERS are there in MS SQL Server?

8 Answers   CarrizalSoft Technologies, TCS, United Healthcare,


Categories