LOCALTIME,LOCALTIMESTAMP
localtime,localtimestampβ
descriptionβ
Syntaxβ
DATETIME localtime()
DATETIME localtimestamp()
Get the current time and return it in Datetime type.
Exampleβ
mysql> select localtime();
+---------------------+
| localtime() |
+---------------------+
| 2022-09-22 17:30:23 |
+---------------------+
mysql> select localtimestamp();
+---------------------+
| localtimestamp() |
+---------------------+
| 2022-09-22 17:30:29 |
+---------------------+
keywordsβ
localtime,localtimestamp