Current Date and Time : Introduction : Date Time Functions MySQL TUTORIALS


MySQL TUTORIALS » Date Time Functions » Introduction »

 

Current Date and Time


There are several methods for obtaining the current date and time:

  1. NOW()/SYSDATE()/CURRENT_TIMESTAMP
  2. CURDATE()/CURRENT_DATE
  3. CURTIME()/CURRENT_TIME
mysql>
mysql> SELECT NOW();
+---------------------+
| NOW()               |
+---------------------+
2007-07-23 18:58:25 |
+---------------------+
row in set (0.00 sec)

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

mysql>



Leave a Comment / Note


 
Verification is used to prevent unwanted posts (spam). .

Follow Navioo On Twitter

MySQL TUTORIALS

 Navioo Date Time Functions
» Introduction