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 / 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       View All Answers


Please Help Members By Posting Answers For Below Questions

What is wide table?

535


What is a non equi join?

540


Define a cross join?

594


Does group by or order by come first?

536


What are clustered and non-clustered index?

545






What are scalar functions in sql?

603


Are resultset updatable?

522


What is difference between equi join and inner join?

482


Difference between Sql server reporting services and Crystal reports?

124


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

546


Define views.

588


Differentiate sql server reporting services vs. Crystal reports?

150


What causes index fragmentation?

575


can a database be shrunk to 0 bytes, if not, why? : Sql server administration

602


What are drillthrough reports?

102