Hi everyone, I know that several questions have been asked similar to this one, however, I was not able to find the thread that could help me in this regard. I have two columns with some random dates as below.
Col A | Col B | Col C |
DD-MM-YYYY | DD-MM-YYYY | XXXX |
I would like to filter only the transactions that have:
[Col A - Col B] more than a month and less than a year. This logic should take into account also the Leap years.
Here it is the expected output I am aiming to.
Col A | Col B | Col C |
29-02-2020 | 29-03-2020 | less than a month |
29-02-2020 | 30-03-2020 | more than a month and less than a year |
29-02-2020 | 30-03-2020 | more than a month and less than a year |
29-02-2020 | 28-02-2021 | more than a month and less than a year |
30-11-2019 | 31-12-2019 | More than a month and less than a year |
Thanks!
Solved! Go to Solution.
Hi @aniutt89
What exactly do you mean by less "than a month"? 30 days? 31 days? Because 2020-02-29 to 2020-03-29 is exactly 1 month according to the standard definition of same day number in the subsequent month. The same question applies to less than a year. 2020-02-29 and 2021-02-28 are exactly one year apart.
Dan
Dan
Hi @danilang,
It depends on the month, if in Column A we have a month with 28/29 days (Feb in this case), 29/30 days must have passed. In case we have a month with 30 days, 31 days must have passed and so on.
@aniutt89 - Honestly, I did not understand your requirement description, but based on your sample I've built the following:
Thanks @ArtApa! It worked as expected. Really appreciated!