Jump to: navigation, search

Mysql NOW

From w3cyberlearnings

Contents

MySQL NOW Function

This function returns the current date and time as a value in 'YYYY-MM-DD HH:MM:SS' for string context and YYYYMMDDHHMMSS.uuuuuu for numeric context.

Syntax NOW

NOW();

Example 1: as string context

mysql> SELECT NOW();
+---------------------+
| NOW()               |
+---------------------+
| 2012-05-22 09:28:33 |
+---------------------+
1 row in set (0.00 sec)

Example 2: as numeric context

mysql> SELECT NOW()+0;
+-----------------------+
| NOW()+0               |
+-----------------------+
| 20120522093057.000000 |
+-----------------------+
1 row in set (0.00 sec)

Related Links



Navigation
Web
SQL
MISC
References