How do i say "today" when constraining DB searches

This is not right is it?
Screen Shot 2022-09-17 at 5.32.06 am

For Today you need to use 2 constrains:

Created date ≥ Current date/time: rounded down to day

and

Created date < Current date/time: rounded down to day: +(days) 1

1 Like

Thanks again Adam!

1 Like

And how do we say ‘yesterday’ is it:

Created date < Current date/time: rounded down to day: +(days) 1

?

You can do Created Date < Current Date/Time: Rounded down to Day: +(days) - 1 to subtract 1 day

And how do we say ‘yesterday’ is it:

Created date < Current date/time: rounded down to day: +(days) 1
?

No… that means anything with a created date before tomorrow (which will be everything, as nothing can be created in the future)…

For ‘yesterday’ you need the following 2 constraints:

Created date ≥ Current date/time: rounded down to Day: +(days) -1

Created date < Current date/time: rounded down to Day

But, as @keith points out, the concept of ‘Today’ or ‘Yesterday’ is a relative term, dependant on time zones (a single moment can occur on two different days, in different time zones), so you need to consider from who’s perspective you’re talking about when you say Today or Yesterday.

2 Likes