Skip to main content
Returns the DATETIME value of a date or datetime expression.

Syntax

Parameters

expr: the time expression you want to convert. It must be of the DATETIME or DATE type.

Return value

Returns a DATETIME value. If the input time is empty or does not exist, such as 2021-02-29, NULL is returned.

Examples

Text