Check If the dates between two dates (Inclusive) is exist in entity dates
Application Type


I have entity E1 as given below.

E1 =>       Id      user     start_date                 end_date

                 1        1          2021-09-26               2021-09-30

                 2        1          2021-09-16               2021-09-23

                 1        2          2021-09-26               2021-09-30

                 2        2          2021-09-16               2021-09-23

And I have StartDate = 2021-09-05 and EndDate = 2021-09-18 for user 1

So, Basically I want to check for the given range StartDate = 2021-09-05, EndDate = 2021-09-18 and  for User = 1 there is date in the entity's start_date and end_date.

what aggregate filter condition that needs to be created for this use case.


Hey There,

What you said right now is the filter condition.

There are 2 options, that I don't understand what you want, 

You can either on that range see any date that is after the start date and end date, as an example. where you use an OR on the filter

Or if you want what is just between those two dates, in that case, you will need an AND. In that case, it will not show anything

Is just a case of wanting to use an Or or an AND, you just need to change the filter that I made.

What this will do is accept all dates that is after StartDate = 2021-09-05, for example,

Give it a try

Kind Regards,



Hi  @Márcio Carvalho,

Thank you for the reply.

When StartDate = 2021-09-05 and EndDate = 2021-09-18 then it should Check If the dates between these two dates (both Inclusive) is lie in entity dates. 

Since dates 16, 17, 18 between StartDate and EndDate is fall under entity record 2 start_date and end_date. so, aggregate should return record below.

2        1          2021-09-16               2021-09-23 


Hi RJ,

looking for overlapping periods can be done as such :

New StartDate<= db enddate and new EndDate >= db startdate.


Hi RJ, 

Hope you are doing well.

I have tried doing like this. You can see it below. In the first image , no filters were applied, and after adding filters , able to find dates(Inclusive) between Start and the End dates.

Thank you. 


Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.