Curriculum
Course: SQL
Login

Curriculum

SQL

SQL References

0/80

MySQL Functions

0/139

SQL Server Functions

0/84

SQL Quick Ref

0/1
Text lesson

ISDATE

Example

Verify whether the expression can be interpreted as a valid date.

SELECT ISDATE(‘2017-08-25’);

Definition and Usage

The ISDATE() function evaluates an expression and returns 1 if it represents a valid date; otherwise, it returns 0.

Syntax

ISDATE(expression)

Parameter Values

Parameter

Description

expression

Required. The expression that is being evaluated for validity as a date.

Technical Details

Return type:

int

Works in:

 SQL Server (from 2008 onward), Azure SQL Database, Azure SQL Data Warehouse, and Parallel Data Warehouse

More Examples

Example

Verify if the expression represents a valid date.

SELECT ISDATE(‘2017’);

Example

Determine whether the expression is a valid date.

SELECT ISDATE(‘Hello world!’);