sajad torkamani

With a single argument

Returns the passed in date or datetime as a datetime value.

Syntax:

TIMESTAMP(expr)

Example:

SELECT TIMESTAMP('1993-07-12')
// 1993-07-12 00:00:00

With two arguments

Returns the passed in date or date time as a datetime value but adds the second argument to the result.

Syntax:

TIMESTAMP(expr1, expr2)

Example:

SELECT TIMESTAMP('1993-07-12', '12:45:00')
// 1993-07-12 12:45:00

Links

Tagged: SQL