Metodo SqlFunctions.IsDate
[Questa pagina è specifica della versione 6 di Entity Framework. La versione più recente è disponibile come pacchetto NuGet per "Entity Framework". Per ulteriori informazioni su Entity Framework, vedere la pagina msdn.com/data/ef.]
Indica se il valore di input rappresenta una data o un'ora valida.
Spazio dei nomi: System.Data.Entity.SqlServer
Assembly: EntityFramework.SqlServer (in EntityFramework.SqlServer.dll)
Sintassi
'Dichiarazione
<DbFunctionAttribute("SqlServer", "ISDATE")> _
<SuppressMessageAttribute("Microsoft.Usage", "CA1801:ReviewUnusedParameters", MessageId := "arg")> _
Public Shared Function IsDate ( _
arg As String _
) As Nullable(Of Integer)
'Utilizzo
Dim arg As String
Dim returnValue As Nullable(Of Integer)
returnValue = SqlFunctions.IsDate(arg)
[DbFunctionAttribute("SqlServer", "ISDATE")]
[SuppressMessageAttribute("Microsoft.Usage", "CA1801:ReviewUnusedParameters", MessageId = "arg")]
public static Nullable<int> IsDate(
string arg
)
[DbFunctionAttribute(L"SqlServer", L"ISDATE")]
[SuppressMessageAttribute(L"Microsoft.Usage", L"CA1801:ReviewUnusedParameters", MessageId = L"arg")]
public:
static Nullable<int> IsDate(
String^ arg
)
[<DbFunctionAttribute("SqlServer", "ISDATE")>]
[<SuppressMessageAttribute("Microsoft.Usage", "CA1801:ReviewUnusedParameters", MessageId = "arg")>]
static member IsDate :
arg:string -> Nullable<int>
public static function IsDate(
arg : String
) : Nullable<int>
Parametri
- arg
Tipo: System.String
Valore su cui è stato eseguito il test.
Valore restituito
Tipo: System.Nullable<Int32>
1 se l'espressione di input è un valore di data o di ora valido di tipo datetime o smalldatetime; in caso contrario, 0.