SqlFunctions.DateName Method

 

Returns a character string that represents the specified datepart of the specified date.

Namespace:   System.Data.Entity.SqlServer
Assembly:  EntityFramework.SqlServer (in EntityFramework.SqlServer.dll)

NameDescription
System_CAPS_pubmethodSystem_CAPS_staticDateName(String, Nullable<DateTime>)

Returns a character string that represents the specified datepart of the specified date.

System_CAPS_pubmethodSystem_CAPS_staticDateName(String, Nullable<DateTimeOffset>)

Returns a character string that represents the specified datepart of the specified date.

System_CAPS_pubmethodSystem_CAPS_staticDateName(String, Nullable<TimeSpan>)

Returns a character string that represents the specified datepart of the specified date.

System_CAPS_pubmethodSystem_CAPS_staticDateName(String, String)

Returns a character string that represents the specified datepart of the specified date.


SqlFunctions.DateName Method (String, Nullable<DateTime>)

Returns a character string that represents the specified datepart of the specified date.

[DbFunctionAttribute("SqlServer", "DATENAME")]
[SuppressMessageAttribute("Microsoft.Usage", "CA1801:ReviewUnusedParameters", 
	MessageId = "datePartArg")]
[SuppressMessageAttribute("Microsoft.Usage", "CA1801:ReviewUnusedParameters", 
	MessageId = "date")]
public static string DateName(
	string datePartArg,
	Nullable<DateTime> date
)

Parameters

datePartArg
Type: System.String

The part of the date to calculate the differing number of time intervals.

date
Type: System.Nullable<DateTime>

The date.

Return Value

Type: System.String

The specified part of the specified date.


SqlFunctions.DateName Method (String, Nullable<DateTimeOffset>)

Returns a character string that represents the specified datepart of the specified date.

[SuppressMessageAttribute("Microsoft.Usage", "CA1801:ReviewUnusedParameters", 
	MessageId = "datePartArg")]
[DbFunctionAttribute("SqlServer", "DATENAME")]
[SuppressMessageAttribute("Microsoft.Usage", "CA1801:ReviewUnusedParameters", 
	MessageId = "date")]
public static string DateName(
	string datePartArg,
	Nullable<DateTimeOffset> date
)

Parameters

datePartArg
Type: System.String

The part of the date to calculate the differing number of time intervals.

date
Type: System.Nullable<DateTimeOffset>

The date.

Return Value

Type: System.String

The specified part of the specified date.


SqlFunctions.DateName Method (String, Nullable<TimeSpan>)

Returns a character string that represents the specified datepart of the specified date.

[DbFunctionAttribute("SqlServer", "DATENAME")]
[SuppressMessageAttribute("Microsoft.Usage", "CA1801:ReviewUnusedParameters", 
	MessageId = "date")]
[SuppressMessageAttribute("Microsoft.Usage", "CA1801:ReviewUnusedParameters", 
	MessageId = "datePartArg")]
public static string DateName(
	string datePartArg,
	Nullable<TimeSpan> date
)

Parameters

datePartArg
Type: System.String

The part of the date to calculate the differing number of time intervals.

date
Type: System.Nullable<TimeSpan>

The date.

Return Value

Type: System.String

The specified part of the specified date.


SqlFunctions.DateName Method (String, String)

Returns a character string that represents the specified datepart of the specified date.

[DbFunctionAttribute("SqlServer", "DATENAME")]
[SuppressMessageAttribute("Microsoft.Usage", "CA1801:ReviewUnusedParameters", 
	MessageId = "datePartArg")]
[SuppressMessageAttribute("Microsoft.Usage", "CA1801:ReviewUnusedParameters", 
	MessageId = "date")]
public static string DateName(
	string datePartArg,
	string date
)

Parameters

datePartArg
Type: System.String

The part of the date to calculate the differing number of time intervals.

date
Type: System.String

The date.

Return Value

Type: System.String

The specified part of the specified date.