How to get number of days in a given year?
Answers were Sorted based on User's Feedback
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 |
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 |
Answer / pulak
select add_months(trunc(sysdate,'year'),12)-trunc(sysdate,'year') as days from dual;
Is This Answer Correct ? | 1 Yes | 3 No |
What is public role in sql server?
What is the purpose of update statistics and scope_identity() function?
What is the maximum size of column in sql server?
What are the advantages dts has over bcp?
How to create new table with "create table" statements?
What is a table called, if it has neither cluster nor non-cluster index? What is it used for?
Explain the use of containers in ssis and also their types?
Can I recover a damaged SQL Server 2008 database with the undamaged .mdb and .ldf files?
What is attribute hierarchy? : sql server analysis services, ssas
What are views in ms sql server?
How do I find the sql server version?
Write a query to delete duplicate records in SQL SERVER