Skip to main content
Extracts the date part of a date or datetime expression.

Syntax

Parameters

expr: the date or datetime expression.

Return value

Returns a value of the DATE type. NULL is returned if the input is NULL or invalid.

Examples

Example 1: Extract the date part of a datetime value.
Example 2: Extract the date part of a date value.
Example 3: Extract the date part of the current timestamp.