Search - Articles
DevASP.NET for ASP.NET, VB.NET, XML and C# (C-Sharp) Developers Tuesday, March 03, 2009
Dev Articles
Search Directory
ASP.NET
VB.Net
C-Sharp
SQL Server
 

Working with DATENAME () function in SQL Server 2008 using PL/SQL.

Author: Shehzad Hemani

In this simple article you will learn that how to work with DATENAME () function in SQL Server using PL/SQL.

 DATENAME () is very common and most useful function of SQL Server.  It is use to find out the day of the week or the month from the given datetime value.

 

This function takes two parameters; one is the value which has to be selected i.e., month or day and second is date from which the value has to be selected.

 

Syntax:

DATENAME (required_name, date)

 

To get the current day of the week

 

SELECT

DATENAME(day, DATE)

AS

'The Day Today Is'

 

Output:

 

The Day Today Is

------------------------

Saturday

   
Add Article Comment:
Name :
Email Address :
   
Comments :
 
   
<< Working with Datepart() function in SQL Server 2008 using PL/SQL.

Disclaimer - Privacy
© 2002-2017 DevASP.net