SQL Server/T-SQL/Date Timezone/ISDATE

Материал из SQL эксперт
Перейти к: навигация, поиск

Evaluating Whether An Expression Is a Date or Is Numeric

 
3>
4>
5> SELECT ISDATE("1/1/20000")
6> GO
-----------
          0
(1 rows affected)



SELECT ISDATE("1/1/2000")

 
3>
4> SELECT ISDATE("1/1/2000")
5> GO
-----------
          1
(1 rows affected)



select ISDATE("2002-09-30")

 

2>
3> select ISDATE("2002-09-30")
4> GO
-----------
          1
(1 rows affected)
1>



select ISDATE("2002-09-31")

 

3> select ISDATE("2002-09-31")
4> GO
-----------
          0
(1 rows affected)



select ISDATE("23:59:59")

 

2> select ISDATE("23:59:59")
3> GO
-----------
          1
(1 rows affected)
1>



select ISDATE("23:99:99")

 

3> select ISDATE("23:99:99")
4> GO
-----------
          0
(1 rows affected)