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 / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

List few advantages of stored procedure.

725


Does sql server 2016 have ssms?

714


What you can do to delete a table without the delete trigger firing?

710


Can you name a few encryption mechanisms in sql server?

689


What is subquery in sql?

737






What is difference between views and tables?

639


What are the rules to use the rowguidcol property to define a globally unique identifier column?

749


How to display a past time in days, hours and minutes?

741


What is tempdb database? : SQL Server Architecture

787


Define union, union all, minus, intersect?

741


how can you check the level of fragmentation on a table? : Sql server administration

712


Explain the purpose of indexes?

723


What is report snapshot in ssrs?

217


What extended events?

766


How do I uninstall sql server 2014?

679