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

Do you know what are pages and extents? : SQL Server Architecture

999


How can I tell if sql server is 32 or 64 bit?

977


What is a primary index?

929


Explain Reporting Life Cycle?

132


How to delete a login name in ms sql server?

1082


what is a join and explain different types of joins? : Sql server database administration

965


How many types of triggers are there?

1073


What is the advantage of sql server?

1042


How to create new table with "create table" statements?

1118


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

1049


What are indexers?

1093


Why normalization is used?

1019


Explain about analysis services?

1057


How to join two tables in a single query in ms sql server?

1001


Create and insert into temp table in sql server?

1039