Current timestamp in mysql|MySQL CURRENT_TIMESTAMP

In MySQL, the CURRENT_TIMESTAMP returns the current date and time in "YYYY-MM-DD HH:MM:SS" format.
NOW() and CURRENT_TIMESTAMP() are get the current_timestamp.

Example:

SELECT CURRENT_TIMESTAMP;

Output:

mysql> SELECT CURRENT_TIMESTAMP;
+----------------------------+
| CURRENT_TIMESTAMP     |
+----------------------------+
| 01/02/2018 6:06:02 PM  | 
+----------------------------+
1 row in set (0.00 sec)

or

SELECT NOW();

Output:

mysql> SELECT NOW();
+---------------------------+
| NOW()                          |
+---------------------------+
| 01/02/2018 6:06:02 PM | 
+---------------------------+
1 row in set (0.00 sec)

Post a Comment

0 Comments