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 are sql servers used for?

0 Answers  


Explain the first normal form(1nf)?

0 Answers  


How to a Query to copy data from on table to another table.

6 Answers   Cap Gemini,


Explain the relational database management system (rdbms)?

0 Answers  


Retrieve the unique rows from table without using UNIQUE and DISTINCT keywords.

0 Answers   Global Logic,






What is cursor in ms sql server?

0 Answers  


What is a linked server in sql server?

0 Answers  


What is normalization and its forms?

4 Answers   Challenger Financial,


List out some of the requirements to set up a sql server failover cluster?

0 Answers  


what is Buffer cash and Log Cache? Can you Explain it?

1 Answers   Wipro,


What is Extended user-defined?

0 Answers  


Please illustrate physical database architecture? : SQL Server Architecture

0 Answers  


Categories