New answers tagged

1

With the help of M Bain I found a solution, because the number of monthes are only 6, 12, 24 and 35. So I did i like this and choosed for the special dates the last existing date: case when day( "date")='31' and month( "date" ) ='03' and "months"=6 then to_date(concat(year("date"), '-09-30' ) ) when day( "date")='31' and month( "date" ) ='05' and "...


5

What a shame the to_interval expression treats each month as 30 days! Here's an ugly expression which will do what you want: to_date(concat(year("date")+floor((month("date")+"months"-1)/12), '-', right('0' || ((month("date")+"months"-1)%12+1) , 2),'-', right('0' || day("date"),2))) It breaks the date down into year, month and day, then uses ...


Top 50 recent answers are included