---
title: "IS_DATE"
description: "The IS_DATE SQL function evaluates to true when a value is representing a valid date/time, based upon the optional format mask."
language: en
source_language: en
translation_state: complete
canonical: https://documentation.invantive.eu/en/docs/invantive-universalsql/grammar/sql-functions/is-date
original: https://documentation.invantive.eu/en/docs/invantive-universalsql/grammar/sql-functions/is-date
updated: 2026-11-05T00:00:00Z
license: https://documentation.invantive.eu/en/
---

## 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 (optional, `varchar2`): format mask. Defaults to configured date/time format. The elements of a format mask are described 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
```

