PostgreSQL系統當前時間

1、獲取當時完整時間

select now();

postgres=# select now();
              now              
-------------------------------
 2018-11-01 15:28:10.956994+08
(1 row)

2、獲取當前日期

select current_date;

postgres=# select current_date;
 current_date 
--------------
 2018-11-01
(1 row)

3、獲取當前時間

postgres=# select current_time;
   current_time    
-------------------
 15:31:35.68233+08
(1 row)
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章