0
I have a Date List
01.01.2017 13-month interval 02.02.2018 period of 14 months 03.04.2019 interval of 8 months 19.12.2019
Is there any way to make a select that returns months between listed dates I already found some answers here on the forum more their example is always between two dates not intervening from several dates listed
The question is to know if you have how to solve with a Select.. otherwise we will have to develop a function for this purpose...
Thank you
In Postgresql you can use the function
age
. From the result (an interval) extract the year, multiply by 12, and add to the months also extracted. If you want to determine the new date by adding a range just add/subtract theinterval
to the original date.– anonimo
That’s not quite what I want... it shows the difference of the record list with today’s date... I want the difference between the records.. listed.. or got it wrong ??
– Gustavo Castilho
Use the function
age
with two parameters: start timestamp and end timestamp.– anonimo