What is the equivalence of MS SQL Server's getutcdate() in postgresql? [duplicate] What is the equivalence of MS SQL Server's getutcdate() in postgresql? [duplicate] sql-server sql-server

What is the equivalence of MS SQL Server's getutcdate() in postgresql? [duplicate]


There are at least two ways to get the current time in UTC:

select now() at time zone 'utc';select current_timestamp at time zone 'utc';


Postgres has current_timestamp for the current date and time, current_date for the current date and current_time for the current time.

Additional details can be found in the documentation.


I believe you are looking for now():

postgres=# select now();            now--------------------------- 2015-05-05 13:52:45.81-04(1 row)