THE WORLD'S LARGEST WEB DEVELOPER SITE

SQL Server ISDATE() Function

❮ SQL Server Functions

Example

Check if the expression is a valid date:

SELECT ISDATE('2017-08-25');
Try it Yourself »

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

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');
Try it Yourself »

Example

Check if the expression is a valid date:

SELECT ISDATE('Hello world!');
Try it Yourself »

❮ SQL Server Functions