yyyy-MM-dd HH:mm:ss.
Syntax
Parameters
str: the time expression you want to convert. It must be of the VARCHAR type.format: the Joda DateTime format of the DATETIME value to be returned. For information about the formats available, see Joda DateTime.
Return value
- If parsing the input string succeeds, a DATETIME value is returned.
- If parsing the input string fails,
NULLis returned.
Examples
Example 1: Convert the string2014-12-21 12:34:56 into a DATETIME value in yyyy-MM-dd HH:mm:ss format.
21/December/23 12:34:56 with a text-style month into a DATETIME value in dd/MMMM/yy HH:mm:ss format.
21/December/23 12:34:56.123 accurate to milliseconds into a DATETIME value in dd/MMMM/yy HH:mm:ss.SSS format.