I would like to subtract one month from a date column in Amazon Redshift (a fork of PostgreSQL 8.0.2).
So for each date column in a table, it will add another column date_minus_a_month.
I tried this code
Select date,date::date -interval '1 month'
from table
and received an error:
Interval values with month or year parts are not supported.
Does anyone have a solution for this?
date
column in your table? – Tim Biegeleisenv
==> useinterval
but notinteral
word. Also useinterval '1' month
but notinteral '1 month'
– krokodilko