May 17, 2026, 11:40 PM
This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
-- Below commands can be used to find postgres db date/timestamp
|
||||
|
||||
postgres=# SELECT CURRENT_TIMESTAMP;
|
||||
current_timestamp
|
||||
----------------------------------
|
||||
2020-07-06 17:45:24.929293+05:30
|
||||
(1 row)
|
||||
|
||||
postgres=# select current_date;
|
||||
current_date
|
||||
--------------
|
||||
2020-07-06
|
||||
(1 row)
|
||||
|
||||
postgres=# select statement_timestamp() ;
|
||||
statement_timestamp
|
||||
----------------------------------
|
||||
2020-07-06 17:46:16.825492+05:30
|
||||
(1 row)
|
||||
|
||||
postgres=# select timeofday() ;
|
||||
timeofday
|
||||
-------------------------------------
|
||||
Mon Jul 06 17:46:23.861551 2020 IST
|
||||
(1 row)
|
||||
|
||||
postgres=# select localtime(0);
|
||||
localtime
|
||||
-----------
|
||||
17:52:38
|
||||
(1 row)
|
||||
|
||||
postgres=# select localtimestamp(0);
|
||||
localtimestamp
|
||||
Reference in New Issue
Block a user