MariaDB: LOCALTIME Function
This MariaDB tutorial explains how to use the MariaDB LOCALTIME function with syntax and examples.
Description
The MariaDB LOCALTIME function returns the current date and time.
Syntax
The syntax for the LOCALTIME function in MariaDB is:
LOCALTIME( )
Parameters or Arguments
There are no parameters or arguments for the LOCALTIME function.
Note
- The LOCALTIME function will return the current date as a 'YYYY-MM-DD HH:MM:SS' format, if used in a string context.
- The LOCALTIME function will return the current date as a YYYYMMDDHHMMSS format, if used in a numeric context.
- The LOCALTIME, CURRENT_TIMESTAMP, and LOCALTIMESTAMP functions are synonyms for the NOW function.
Applies To
The LOCALTIME function can be used in the following versions of MariaDB:
- MariaDB 10
Example
Let's look at some MariaDB LOCALTIME function examples and explore how to use the LOCALTIME function in MariaDB.
For example:
SELECT LOCALTIME(); Result: '2014-05-18 10:51:05' SELECT LOCALTIME() + 0; Result: 20140518105105 SELECT LOCALTIME() + 1; Result: 20140518105106
Advertisements