bugl
bugl
HomeLearnPatternsSearch
HomeLearnPatternsSearch

Loading lesson path

Learn/SQL/SQL References
SQL•SQL References

SQL Server ISDATE() Function

Concept visual

SQL Server ISDATE() Function

Pointer walk
two pointers
leftright102132436485116
left=0
right=6
1
3

Start at both ends

Example

Check if the expression is a valid date:

SELECT ISDATE('2017-08-25');

Definition and Usage

The ISDATE() function checks an expression and returns 1 if it is a valid date, otherwise

0.

Syntax

Isdate(

expression )

Parameter Values

Parameter

Description expression

Required. The expression to test

Technical Details

Return type:

int

Works in:

SQL Server (starting with 2008), Azure SQL Database, Azure SQL Data Warehouse, Parallel Data Warehouse

More Examples

Example

Check if the expression is a valid date:

SELECT ISDATE('2017');

Example

Check if the expression is a valid date:

SELECT ISDATE('Hello world!');

Previous

❮ SQL Server Functions

Next

Previous

SQL Server GETUTCDATE() Function

Next

SQL Server MONTH() Function