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

How to create a view with data from multiple tables?

0 Answers  


Can you create UNIQUE and PRIMARY KEY constraints on computed columns in SQL Server 2000?

3 Answers   Infosys,


How will you add a dimension to cube? : sql server analysis services, ssas

0 Answers  


How do you check the performance of a query and how do you optimize it?

1 Answers  


How are the unique and primary key constraints different?

0 Answers  


How do I perform an unattended install of sql server 2000?

0 Answers  


What do you do in data exploration

0 Answers   EXL,


How do you debug a procedure in sql server?

0 Answers  


What is amo? : sql server analysis services, ssas

0 Answers  


how can u get last observation in an unknown dataset ?

0 Answers   Genpact,


Is it important for a database administrator to understand the operating system and file access?

0 Answers  


How do you use a subquery to find records that exist in one table and do not exist in another?

0 Answers  


Categories