I am trying to determine how to turn a day-of-year back into a date in PgSQL. When I do this
select date '2013-01-01' + interval '53 days'
I get a timestamp:
"2013-02-23 00:00:00"
So how come when I do any of the following
select extract(date from (date '2013-01-01' + interval '53 days'))
select extract(date from (select date '2013-01-01' + interval '53 days'))
I get "ERROR: timestamp units "date" not recognized"? Besides the why, how can I do what I want, which is to only get the date portion of the result of the original operation?