Reputation: 764
I am finding alternatives to various functions of SQL Server in PostgreSQL.
Is there an alternative to the following SQL Server code in PostgreSQL?
SELECT DATENAME(WEEKDAY,CURRENT_TIMESTAMP)
Note: The above query returns the "weekday-name" of the current day
Upvotes: 1
Views: 7935
Reputation: 14628
You can check the official documentation for date formats https://www.postgresql.org/docs/9.5/static/functions-formatting.html
Example usage:
SELECT to_char(CURRENT_TIMESTAMP, 'Day')
Upvotes: 4