How to get day month or year from SQL Server date column

How to get day month or year from SQL Server date column?

Before going to below tutorial Download adventureworks database for sql server 2008 r2

SELECT year(HireDate) [Join year],MONTH(HireDate) [Join MONTH],
DAY(HireDate) [Join DAY]
  FROM [AdventureWorks2008R2].[HumanResources].[Employee]


Output:

Share this post :

Post a Comment

Please give your valuable feedback on this post. You can submit any ASP.NET article here. We will post that article in this website by your name.

 
Support : Ranga Rajesh Kumar
Copyright © 2012. ASP.NET Examples - All Rights Reserved
Site Designed by Ranga Rajesh Kumar