Name
LOCALTIMESTAMP( )
Synopsis
LOCALTIMESTAMP( )
This
function returns the current system date in yyyy-mm-dd
hh:mm:ss format. You can use it in
SELECT
statements as shown, in
INSERT
and UPDATE
statements to
set a value, or in a WHERE
clause. This statement
is available as of Version 4.0.6 of MySQL. Incidentally, the
parentheses are not required. This function is synonymous with
LOCALTIME( )
and NOW( )
.
SELECT LOCALTIMESTAMP( ); +---------------------+ | LOCALTIMESTAMP( ) | +---------------------+ | 2005-01-10 14:49:56 | +---------------------+
Get MySQL in a Nutshell now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.