Can you do previous day?

Is it possible to do show data from yesturday by getting current date (-)minus 1 day

I only see (+) :confused:

05

Try -1

no luck

If you use the (+days): operator, then type “-1” as the value, it should work.

2 Likes

Thanks @andrewgassen , i’m actually struggling to get any returned entry based on created date… any tips?

Logic seems right to me, but i’m getting no result

Current date/time goes all the way to the second or millisecond, so it’s highly unlikely you’ll find anything that matches that exactly. You need to specify a specific date, not date/time. I think there’s an “extract” function maybe? I’m not in front of a computer to check, otherwise I’d map it out for you.

1 Like

Thanks! I actually realised i’m coming at this from the wrong angle. I’m going with a repeating group and the display next/ previous entry based on creation date method instead :slight_smile:

As @andrewgassen alludes to, the date data type specifies a unique moment in time. There is, in fact, no such thing as a date without a time component.

Of course, it is common for us to want to know: “Do these two moments in time happen on the same day?” (By which we mean, “Do they happen on the same ‘calendar date’?”

The easiest (and very performant) way to understand if two date objects share the same calendar date is to compare them textwise:

if date1:formatted as 08/10/2018 is date_2:formatted as 08/10/2018 then these two moments in time happen on the same calendar date. (“On the same day” as we would say casually.)

That comparison evaluates to “no” (false) if the two moments in time happen on different calendar dates.

For a good overview of dates and date ranges, you might be interested in: