mysql>
select now();
+---------------------+
| now() |
+---------------------+
| 2011-06-11 12:00:54 |
+---------------------+
1 row in set (0.00 sec)
mysql> select sysdate();
+---------------------+
| sysdate() |
+---------------------+
|2011-06-11 12:00:54 |
+---------------------+
1 row in set (0.00 sec)
mysql> select curdate();
+------------+
| curdate() |
+------------+
| 2011-06-11 |
+------------+
1 row in set (0.00 sec)
mysql> select current_date;
+--------------+
| current_date |
+--------------+
| 2011-06-11 |
+--------------+
1 row in set (0.00 sec)
mysql> select curtime();
+-----------+
| curtime() |
+-----------+
| 12:00:54 |
+-----------+
1 row in set (0.00 sec)
mysql> select current_time;
+--------------+
| current_time |
+--------------+
| 12:00:54 |
+--------------+
1 row in set (0.00 sec)
MySql獲取系統時間
mysql獲取系統當前時間的函式 環境 mysql server 5.1 問題 mysql獲取系統當前時間的函式 解決 now 函式以 yyyy mm dd hh mm ss 返回當前的日期時間,可以直接存到datetime欄位中。curdate 以 yyyy mm dd 的格式返回今天的日期,可以...
mysql 獲取系統時間及其格式
mysql select now now 2011 06 11 12 00 54 1 row in set 0.00 sec mysql select sysdate sysdate 2011 06 11 12 00 54 1 row in set 0.00 sec mysql select cur...
mysql 獲取系統時間(毫秒數)
sql語句 select time to sec now now current timestamp replace unix timestamp current timestamp 3 執行結果 優化版 最後乙個,就是你想要的系統毫秒數了 獲取已知日期的時間毫秒數 select unix time...