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 returns 1 if the expression is a valid date, otherwise 0.

Syntax

ISDATE(expression)

Parameter Values

Parameter Description
expression Required. The value to test

Technical Details

Works in: SQL Server 2014, SQL Server 2012, SQL Server 2008 R2, SQL Server 2008, SQL Server 2005

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