Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

How to get number of days in a given year?

Answer Posted / rajkumar

DECLARE @IsLeapYear        BIT




    SET @IsLeapYear = 0
    IF (YEAR( @pDate ) % 4 = 0 AND YEAR( @pDate ) % 100 != 0) OR
        YEAR( @pDate ) % 400 = 0
        SET @IsLeapYear = 1




    select 365 + @IsLeapYear

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Which are new data types introduced in sql server 2008?

1046


Benefits of Stored Procedures?

963


What does Master database contains?

1133


List out the different types of locks available in sql server?

976


How to insert a new row into a table with "insert into" statements in ms sql server?

971


Does group by or order by come first?

954


How do I open port 1433?

930


We need to perform what steps in the following order to work with a cursor?

1214


Which trace flags are enabled in sql server?

1011


What is sub query and its properties?

972


Explain query editor regions

1042


How to compose an inquiry to demonstrate the points of interest of an understudy from students table whose name begins with k?

1089


You are designing a strategy for synchronizing an SQL Azure database and multiple remote Microsoft SQL Server 2008 databases. The SQL Azure database contains many tables that have circular foreign key relationships?

121


Explain the ways to controlling cursor behavior?

915


What is the use of partition by in sql server?

931