語言

SqlFunctions.DateName 方法

定義

回傳一個字串,代表指定日期的日期部分。

多載

名稱 Description
DateName(String, String)

回傳一個字串,代表指定日期的日期部分。

DateName(String, Nullable<TimeSpan>)

回傳一個字串,代表指定日期的日期部分。

DateName(String, Nullable<DateTimeOffset>)

回傳一個字串,代表指定日期的日期部分。

DateName(String, Nullable<DateTime>)

回傳一個字串,代表指定日期的日期部分。

備註

你不能直接呼叫這個函式。 此函式只能出現在 LINQ 對 Entities 查詢中。

這個函式會被轉換成資料庫中的對應函式。 關於對應的SQL Server函數,請參見 DATENAME (Transact-SQL)。

DateName(String, String)

回傳一個字串,代表指定日期的日期部分。

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);
[<System.Data.Objects.DataClasses.EdmFunction("SqlServer", "DATENAME")>]
static member DateName : string * string -> string
Public Shared Function DateName (datePartArg As String, date As String) As String

參數

datePartArg
String

日期的部分用來計算不同數量的時間間隔。

date
String

日期。

傳回

指定日期的指定部分。

屬性

備註

你不能直接呼叫這個函式。 此函式只能出現在 LINQ 對 Entities 查詢中。

這個函式會被轉換成資料庫中的對應函式。 關於對應的SQL Server函數,請參見 DATENAME (Transact-SQL)。

適用於

DateName(String, Nullable<TimeSpan>)

回傳一個字串,代表指定日期的日期部分。

public:
 static System::String ^ DateName(System::String ^ datePartArg, Nullable<TimeSpan> date);
[System.Data.Objects.DataClasses.EdmFunction("SqlServer", "DATENAME")]
public static string DateName(string datePartArg, TimeSpan? date);
[<System.Data.Objects.DataClasses.EdmFunction("SqlServer", "DATENAME")>]
static member DateName : string * Nullable<TimeSpan> -> string
Public Shared Function DateName (datePartArg As String, date As Nullable(Of TimeSpan)) As String

參數

datePartArg
String

日期的部分用來計算不同數量的時間間隔。

date
Nullable<TimeSpan>

日期。

傳回

指定日期的指定部分。

屬性

備註

你不能直接呼叫這個函式。 此函式只能出現在 LINQ 對 Entities 查詢中。

這個函式會被轉換成資料庫中的對應函式。 關於對應的SQL Server函數,請參見 DATENAME (Transact-SQL)。

適用於

DateName(String, Nullable<DateTimeOffset>)

回傳一個字串,代表指定日期的日期部分。

public:
 static System::String ^ DateName(System::String ^ datePartArg, Nullable<DateTimeOffset> date);
[System.Data.Objects.DataClasses.EdmFunction("SqlServer", "DATENAME")]
public static string DateName(string datePartArg, DateTimeOffset? date);
[<System.Data.Objects.DataClasses.EdmFunction("SqlServer", "DATENAME")>]
static member DateName : string * Nullable<DateTimeOffset> -> string
Public Shared Function DateName (datePartArg As String, date As Nullable(Of DateTimeOffset)) As String

參數

datePartArg
String

日期的部分用來計算不同數量的時間間隔。

date
Nullable<DateTimeOffset>

日期。

傳回

指定日期的指定部分。

屬性

備註

你不能直接呼叫這個函式。 此函式只能出現在 LINQ 對 Entities 查詢中。

這個函式會被轉換成資料庫中的對應函式。 關於對應的SQL Server函數,請參見 DATENAME (Transact-SQL)。

適用於

DateName(String, Nullable<DateTime>)

回傳一個字串,代表指定日期的日期部分。

public:
 static System::String ^ DateName(System::String ^ datePartArg, Nullable<DateTime> date);
[System.Data.Objects.DataClasses.EdmFunction("SqlServer", "DATENAME")]
public static string DateName(string datePartArg, DateTime? date);
[<System.Data.Objects.DataClasses.EdmFunction("SqlServer", "DATENAME")>]
static member DateName : string * Nullable<DateTime> -> string
Public Shared Function DateName (datePartArg As String, date As Nullable(Of DateTime)) As String

參數

datePartArg
String

日期的部分用來計算不同數量的時間間隔。

date
Nullable<DateTime>

日期。

傳回

指定日期的指定部分。

屬性

備註

你不能直接呼叫這個函式。 此函式只能出現在 LINQ 對 Entities 查詢中。

這個函式會被轉換成資料庫中的對應函式。 關於對應的SQL Server函數,請參見 DATENAME (Transact-SQL)。

適用於