SQL: TIMESTAMP() function
27 July 2025 (Updated 27 July 2025)
On this page
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