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 are the kinds of subquery?
What is an example of a foreign key?
can we call stored Procedure in Function in Sql Server 2000 and vice versa.
3 Answers C3I, eSoft, iPRO Solutions, Wipro,
How do I know if localdb is running?
there is a trigger defined for insert operations on a table, in an oltp system. The trigger is written to instantiate a com object and pass the newly inserted rows to it for some custom processing. What do you think of this implementation? Can this be implemented better? : Sql server database administration
Please give me queries for the following 1. To get the count of duplicate records. 2. A query to delete the duplicate records.
What is the benefit of normalization?
you accidentally delete the msdb database what effect does this have on your existing sql databases, and how do you recover? : Sql server administration
What are the properties and different types of sub-queries?
what is diffrent between store procedure and trigger
If i am handling 150 servers then how to check the active jobs of all the servers?
How to get the query of a table in sql server?