## Syntax
```mermaid
%%{init: {
'theme': 'base',
'flowchart': { 'padding': '7', 'nodeSpacing': '20', 'rankSpacing': '20' },
'themeVariables': {
'fontSize': '11px',
'fontFamily': 'Arial'
}
}}%%
flowchart LR
Start((START)) --> IS_DATE[IS_DATE]:::quoted
IS_DATE --> End((END))
```
## Purpose
The `IS_DATE` SQL function evaluates to `true` when a value is representing a valid date/time, based upon the optional format mask. A valid date/time can be cast to a `datetime` value using [[TO_DATE]].
Parameters:
- Input (`ANY`): value to test whether a cast to `datetime` is possible.
- Format (`varchar2`): format mask. Optional; defaults to configured date/time format. The list of format masks is available in [[Format Masks]].
Returns: true when the text can be cast to a `datetime`, false otherwise.
## Examples
The following example determines whether `'20190101'` can be cast to a `datetime`:
```sql
select is_date('20190101', 'YYYYMMDD')
----------------
true
```
The following example determines whether a number can be cast to a `datetime`:
```sql
select is_date(20190101, 'YYYYMMDD')
----------------
false
```
The following example determines whether `'nonsense'` can be cast to a `datetime`:
```sql
select is_date('nonsense')
----------------
false
```