Can you do previous day?

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: