SqlFunctions.IsDate(String) 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
指出輸入值是否為有效的日期或時間。
public:
static Nullable<int> IsDate(System::String ^ arg);
[System.Data.Objects.DataClasses.EdmFunction("SqlServer", "ISDATE")]
public static int? IsDate(string arg);
[<System.Data.Objects.DataClasses.EdmFunction("SqlServer", "ISDATE")>]
static member IsDate : string -> Nullable<int>
Public Shared Function IsDate (arg As String) As Nullable(Of Integer)
參數
- arg
- String
測試值。
傳回
如果輸入運算式為 datetime 或 smalldatetime 資料型別的有效日期或時間值,則為 1,否則為 0。
- 屬性
備註
您無法直接呼叫此函式。 此函式只能出現在 LINQ to Entities 查詢中。
此函式會轉譯為資料庫中的對應函式。 如需對應 SQL Server 函式的相關信息,請參閱 HOSTNAME (Transact-SQL) 。