is_valid_date

The is_valid_date function indicates whether an expression can be converted into a valid calendar date value.

Category

Validation

Return value

boolean

Returns true if string can be converted into a valid date; returns false if the string can't be converted into a valid date.

Where

<input_string>

The expression to be validated.

If the expression doesn't resolve to a value of data type varchar, the software converts the value to varchar and issues a warning.

<format_string>

The string that identifies the date format of the input string. The following are the supported date formats: MM/DD/YYYY, DD/MM/YYYY, YYYY/DD/MM.

The data type must be varchar.

Example