SqlFunctions.DateName SqlFunctions.DateName SqlFunctions.DateName SqlFunctions.DateName Method

Definition

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

Overloads

DateName(String, String) DateName(String, String) DateName(String, String) DateName(String, String)

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

DateName(String, Nullable<TimeSpan>) DateName(String, Nullable<TimeSpan>) DateName(String, Nullable<TimeSpan>) DateName(String, Nullable<TimeSpan>)

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

DateName(String, Nullable<DateTimeOffset>) DateName(String, Nullable<DateTimeOffset>) DateName(String, Nullable<DateTimeOffset>) DateName(String, Nullable<DateTimeOffset>)

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

DateName(String, Nullable<DateTime>) DateName(String, Nullable<DateTime>) DateName(String, Nullable<DateTime>) DateName(String, Nullable<DateTime>)

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

Remarks

You cannot call this function directly. This function can only appear within a LINQ to Entities query.

This function is translated to a corresponding function in the database. For information about the corresponding SQL Server function, see DATENAME (Transact-SQL).

DateName(String, String) DateName(String, String) DateName(String, String) DateName(String, String)

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

public:
 static System::String ^ DateName(System::String ^ datePartArg, System::String ^ date);
[System.Data.Objects.DataClasses.EdmFunction("SqlServer", "DATENAME")]
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 String String String

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

date
String String String String

The date.

Returns

The specified part of the specified date.

Remarks

You cannot call this function directly. This function can only appear within a LINQ to Entities query.

This function is translated to a corresponding function in the database. For information about the corresponding SQL Server function, see DATENAME (Transact-SQL).

DateName(String, Nullable<TimeSpan>) DateName(String, Nullable<TimeSpan>) DateName(String, Nullable<TimeSpan>) DateName(String, Nullable<TimeSpan>)

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

public:
 static System::String ^ DateName(System::String ^ datePartArg, Nullable<TimeSpan> date);
[System.Data.Objects.DataClasses.EdmFunction("SqlServer", "DATENAME")]
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 String String 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.

Remarks

You cannot call this function directly. This function can only appear within a LINQ to Entities query.

This function is translated to a corresponding function in the database. For information about the corresponding SQL Server function, see DATENAME (Transact-SQL).

DateName(String, Nullable<DateTimeOffset>) DateName(String, Nullable<DateTimeOffset>) DateName(String, Nullable<DateTimeOffset>) DateName(String, Nullable<DateTimeOffset>)

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

public:
 static System::String ^ DateName(System::String ^ datePartArg, Nullable<DateTimeOffset> date);
[System.Data.Objects.DataClasses.EdmFunction("SqlServer", "DATENAME")]
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 String String 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.

Remarks

You cannot call this function directly. This function can only appear within a LINQ to Entities query.

This function is translated to a corresponding function in the database. For information about the corresponding SQL Server function, see DATENAME (Transact-SQL).

DateName(String, Nullable<DateTime>) DateName(String, Nullable<DateTime>) DateName(String, Nullable<DateTime>) DateName(String, Nullable<DateTime>)

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

public:
 static System::String ^ DateName(System::String ^ datePartArg, Nullable<DateTime> date);
[System.Data.Objects.DataClasses.EdmFunction("SqlServer", "DATENAME")]
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 String String 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.

Remarks

You cannot call this function directly. This function can only appear within a LINQ to Entities query.

This function is translated to a corresponding function in the database. For information about the corresponding SQL Server function, see DATENAME (Transact-SQL).

Applies to