Earn income with your data and sql skills
Sign up and we'll send you the best freelance opportunities straight to your inbox.
We're building the largest self-service freelancing marketplace for people like you.

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



Earn income with your data and sql skills
Sign up and we'll send you the best freelance opportunities straight to your inbox.
We're building the largest self-service freelancing marketplace for people like you.

Guides


vsn 3.1