Dofactory.com
Dofactory.com
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 freelancing marketplace for people like you.
By adding your name & email you agree to our terms, privacy and cookie policies.

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



Last updated on Dec 21, 2023

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 freelancing marketplace for people like you.
By adding your name & email you agree to our terms, privacy and cookie policies.