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
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 |
Answer / aravazhi
select month(getdate()) Curr_Mon,Year(getdate())
Curr_Year,day(getdate()) as Curr_day
Is This Answer Correct ? | 3 Yes | 1 No |
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 |
What is the command used to check locks in microsoft sql server?
What are the restraints imposed on the table design by a merge replication?
What is a trace frag?
What do you mean by an execution plan? Why is it used? How would you view it?
can any one please send sql quries most used in applications.
Explain the creation and execution of a user-defined function in the sql server?
What are alternate keys?
Does hive support indexing?
What are logical/boolean operations in ms sql server?
how many instance use in sql server 2005
Suppose you want to implement the one-to-many relationships while designing tables. How would you do it?
After the SQL installation what are the jobs will you configure?
1 Answers G7 CR Technologies, IBM, Satyam,