I need get only the date from now() at my time zone, I have this query:
SELECT now() AT TIME ZONE 'America/Santiago'
And I'm getting something like this "2015-06-08 23:59:34.142569" but I need extract only the date, how can I get it? Thanks.
I need get only the date from now() at my time zone, I have this query:
SELECT now() AT TIME ZONE 'America/Santiago'
And I'm getting something like this "2015-06-08 23:59:34.142569" but I need extract only the date, how can I get it? Thanks.
If you want the server's date,
If you need the date for any timestamp, eg the one you've gotten into your timezone, use
date()
.Docs: http://www.postgresql.org/docs/current/static/functions-datetime.html