共用方式為


SqlFunctions.IsDate(String) 方法

定義

指出輸入值是否為有效的日期或時間。

[System.Data.Entity.DbFunction("SqlServer", "ISDATE")]
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA1801:ReviewUnusedParameters", MessageId="arg")]
public static Nullable<int> IsDate(string arg);
static member IsDate : string -> Nullable<int>
Public Shared Function IsDate (arg As String) As Nullable(Of Integer)

參數

arg
String

測試值。

傳回

如果輸入運算式為 datetime 或 smalldatetime 資料型別的有效日期或時間值,則為 1,否則為 0。

屬性

適用於