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 sql servers used for?
Explain the first normal form(1nf)?
How to a Query to copy data from on table to another table.
Explain the relational database management system (rdbms)?
Retrieve the unique rows from table without using UNIQUE and DISTINCT keywords.
What is cursor in ms sql server?
What is a linked server in sql server?
What is normalization and its forms?
4 Answers Challenger Financial,
List out some of the requirements to set up a sql server failover cluster?
what is Buffer cash and Log Cache? Can you Explain it?
What is Extended user-defined?
Please illustrate physical database architecture? : SQL Server Architecture