isdate
The isdate function is used to determine whether a date string can be converted to a date value according to the specified format.
Syntax
isdate(string date , string format)
Parameters
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| date | Yes | DATE or STRING | The string to be evaluated. If the input is of type BIGINT, DOUBLE, DECIMAL, or DATETIME, it is implicitly converted to STRING type before computation. The date parameter can be in any string format. |
| format | Yes | STRING | The target date format for conversion. A STRING type constant. Extended date formats are not supported. The format is a combination of time units representing year, month, day, hour, minute, and second, along with any characters.
|
Return Values
Returns a value of type BOOLEAN.
If the date or format value is NULL, NULL is returned.
Example Code
Returns true.
select isdate('2023-08-10','yyyy-mm-dd'); Returns false.
select isdate(123456789,'yyyy-mm-dd');
What is your overall rating for this page?
Thank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot