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...

hi, may i know what is the command to get abstract the
current month, current year and current day from a given
date.i want these three in a isolated way..seperatedly is
that any way in sql server 2000

Answer Posted / madhu

We can get date, month and year seperately from the
current date like

select DATEPART(d, getdate()) to get current date
select DATEPART(mm, getdate()) to get current month
select DATEPART(yy, getdate()) to get current year

Is This Answer Correct ?    7 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the types of indexes?

1085


What are security principals used in sql server 2005?

989


Explain about the command-line tool SQLCMD?

1093


What is the use of attributehierarchyvisible ? : sql server analysis services, ssas

1069


Do you know what guidelines should be followed to help minimize deadlocks?

971


how can you attach more than 20 ldf files in sql server

2004


How to generate create procedure script on an existing stored procedure?

1012


Difference between LEN() and DATALENGTH() in sql server ?

1111


How to encrypt Strored Procedure in SQL SERVER?

1172


What are the different types of stored procedures?

1117


Where is my database stored on the hard disk in ms sql server?

1063


How to check if stored procedure is running in sql server?

1064


Your table has a large character field there are queries that use this field in their search clause what should you do?

886


What is store procedure? How do they work? When do you use?

945


Explain the xml support sql server extends?

1043