Outdated Version

You are viewing an older version of this section. View current production version.

TIMESTAMP

Convert the input argument to a datetime object.

Syntax

TIMESTAMP(dateobj)

Arguments

  • dateobj: a valid date, datetime, or parsable date string.

Return Type

Datetime object. If dateobj is not a valid date, returns NULL.

Examples

memsql> select timestamp('2015-03-03');
+-------------------------+
| timestamp('2015-03-03') |
+-------------------------+
| 2015-03-03 00:00:00     |
+-------------------------+

Related Topics