SqlFunctions.DateName Method
Returns a character string that represents the specified datepart of the specified date.
Assembly: EntityFramework.SqlServer (in EntityFramework.SqlServer.dll)
Name | Description | |
---|---|---|
![]() ![]() | DateName(String, Nullable<DateTime>) | 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<TimeSpan>) | 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. |
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.
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.
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.
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.