SqlFunctions.DateName Method

Definition

Overloads

DateName(String, String)

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

DateName(String, Nullable<TimeSpan>)

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

DateName(String, Nullable<DateTimeOffset>)

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

DateName(String, Nullable<DateTime>)

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

DateName(String, String)

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

[System.Data.Entity.DbFunction("SqlServer", "DATENAME")]
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA1801:ReviewUnusedParameters", MessageId="datePartArg")]
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA1801:ReviewUnusedParameters", MessageId="date")]
public static string DateName (string datePartArg, string date);
static member DateName : string * string -> string
Public Shared Function DateName (datePartArg As String, date As String) As String

Parameters

datePartArg
String

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

date
String

The date.

Returns

The specified part of the specified date.

Attributes

Applies to

DateName(String, Nullable<TimeSpan>)

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

[System.Data.Entity.DbFunction("SqlServer", "DATENAME")]
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA1801:ReviewUnusedParameters", MessageId="date")]
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA1801:ReviewUnusedParameters", MessageId="datePartArg")]
public static string DateName (string datePartArg, Nullable<TimeSpan> date);
static member DateName : string * Nullable<TimeSpan> -> string
Public Shared Function DateName (datePartArg As String, date As Nullable(Of TimeSpan)) As String

Parameters

datePartArg
String

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

date
Nullable<TimeSpan>

The date.

Returns

The specified part of the specified date.

Attributes

Applies to

DateName(String, Nullable<DateTimeOffset>)

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

[System.Data.Entity.DbFunction("SqlServer", "DATENAME")]
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA1801:ReviewUnusedParameters", MessageId="datePartArg")]
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA1801:ReviewUnusedParameters", MessageId="date")]
public static string DateName (string datePartArg, Nullable<DateTimeOffset> date);
static member DateName : string * Nullable<DateTimeOffset> -> string
Public Shared Function DateName (datePartArg As String, date As Nullable(Of DateTimeOffset)) As String

Parameters

datePartArg
String

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

date
Nullable<DateTimeOffset>

The date.

Returns

The specified part of the specified date.

Attributes

Applies to

DateName(String, Nullable<DateTime>)

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

[System.Data.Entity.DbFunction("SqlServer", "DATENAME")]
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA1801:ReviewUnusedParameters", MessageId="datePartArg")]
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA1801:ReviewUnusedParameters", MessageId="date")]
public static string DateName (string datePartArg, Nullable<DateTime> date);
static member DateName : string * Nullable<DateTime> -> string
Public Shared Function DateName (datePartArg As String, date As Nullable(Of DateTime)) As String

Parameters

datePartArg
String

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

date
Nullable<DateTime>

The date.

Returns

The specified part of the specified date.

Attributes

Applies to