Example count within date range

Hi,

It can’t be that hard but I cannot make the range to work. I have a date field and I want to calculate how many entries are within 0-7 days of the current time. Here’ are the screenshots of all possibilities I tried and all result in 0 entries while it should be 2.

Schermafbeelding 2020-11-09 om 09.49.58 Schermafbeelding 2020-11-09 om 09.50.21 Schermafbeelding 2020-11-09 om 09.52.30

Can you provide an example how this should be setup?

Hi there, @j.poolman… I know I’ve had success with what you are trying to do by splitting it into two conditions. So, the first condition is > Current date/time , and the second condition is < Current date/time +(days): 7. If you want the current date and the current date + 7 to include the entire day, you could change hours, minutes, and seconds to 0 in the first condition, and change them to 23, 59, and 59 (respectively) in the second condition. Want to give that a shot and see if you get the desired result?

Hope this helps.

Best…
Mike

Thanks Mike, I will give it a try and report back here.

1 Like

Works like a charm :slight_smile: I indeed need the whole day. Is this what you meant by changing the time?Schermafbeelding 2020-11-09 om 14.09.05

Happy to hear it worked for you!

Yes, that’s what I meant by changing hours, minutes, and second… although, you used +(minutes) rather than change minutes to.

Thanks for the warning. That was a mistake.

1 Like

Hi Mike,

Small adjustment it needs to be >= in order to calculate the current date itself. A bit weird as I placed the current day to 0:00:00

Schermafbeelding 2020-11-10 om 10.52.12

1 Like

This topic was automatically closed after 70 days. New replies are no longer allowed.