SQL ISDATE Function

ISDATE checks if the specified expression is a valid date, time, or datetime value.

ISDATE returns 1 for true and 0 for false.

Example

#

This example checks whether the input value is a valid date.

SELECT ISDATE('2022-08-03') AS 'Is Date'
Result:  1 record
Is Date
1

Syntax

Syntax of the ISDATE function .

ISDATE(expression) 

expression -- a string or expression less than 4,000 characters.


More Examples

ISDATE with INVALID VALUE

Problem: Check if input value is a valid date.
SELECT ISDATE('09,01,21') AS 'Is Date'
Result:  1 record
Is Date
0

You may also like



Guides


vsn 3.1