# DateOnly

{% hint style="info" %}
The **`DateOnly()`** function only returns the date part without the time part of a date.&#x20;

This function is NOT SQL compatible. For more information about SQL compatibility, see our [documentation](https://docs.wem.io/platform/wemreference/sql-compatibility).
{% endhint %}

{% hint style="success" %}
Returns the <mark style="color:green;">date</mark> only.

Returns <mark style="color:red;">**`Unknown`**</mark> if one of the parameter values is unknown or outside the common valid date boundaries.
{% endhint %}

### Syntax

<details>

<summary><code>DateOnly(</code><mark style="color:blue;"><code>datetime</code></mark><code>)</code></summary>

`DateOnly('2016-05-02T05:37:44')`\
\=>*Result:* 5/2/2016

`DateOnly(unknowndatetime)`\
\=>*Result: unknowndatetime*

</details>

### Parameters

<table><thead><tr><th width="181.70825474075613">Name</th><th width="150">Type</th><th width="150" align="center">Required</th><th width="248.15953250810662">Description</th><th data-hidden>Required?</th></tr></thead><tbody><tr><td><mark style="color:blue;"><code>datetime</code></mark></td><td>date time</td><td align="center"><span data-gb-custom-inline data-tag="emoji" data-code="2611">☑️</span></td><td>a date</td><td>yes</td></tr></tbody></table>
