NOW in Postgresql - show date only

Viewed 832

I need to use NOW() in Postgres 11.5 and need to get the date like below:

2019-10-07

aka YYYY-MM-DD style. How do I do this? Just using NOW() alone gives me a huge string with time and everything.

1 Answers

Take

SELECT CURRENT_DATE

or do an explicit cast

SELECT now()::date
Related