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

Answers were Sorted based on User's Feedback



hi, may i know what is the command to get abstract the current month, current year and current day ..

Answer / 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

hi, may i know what is the command to get abstract the current month, current year and current day ..

Answer / aravazhi

select month(getdate()) Curr_Mon,Year(getdate())
Curr_Year,day(getdate()) as Curr_day

Is This Answer Correct ?    3 Yes 1 No

hi, may i know what is the command to get abstract the current month, current year and current day ..

Answer / dharmendra k. dixit

We can do that by writing our query in this way..

Select datename(dd, getdate()) for Date
Select datename(mm, getdate()) for Month
Select datename(yy, getdate()) for Year

Is This Answer Correct ?    2 Yes 2 No

Post New Answer

More SQL Server Interview Questions

what is extended StoreProcedure ?

3 Answers   Satyam,


what is difference between nchar and char in Sql server ?

3 Answers  


What is the difference between IN and EXISTS operators in SQL Server?

9 Answers   ASD Lab, CSC, Intelligroup,


explain what is a schema in sql server 2005? Explain how to create a new schema in a database? : Sql server database administration

0 Answers  


How can you see what type of locks used?

1 Answers  


Define self join in sql server joins?

0 Answers  


what is the maximum size of sql row in mssql?

1 Answers  


What is trigger in salesforce?

0 Answers  


What is Trace flag?

1 Answers   Wipro,


How to create an index on an existing table in ms sql server?

0 Answers  


What is the bookmark lookup and rid lookup?

0 Answers  


What is use of except clause? How it differs from not in clause?

0 Answers  


Categories