Notion Formula: Next 3 Days

Question

Is there a way to set up a filter within a database to show only the next three days?
 

Yes!

Need to create a Formula property with the code below, this is mark as true if the date is today, or tomorrow, or the day after tomorrow.
 
This is using the formulas dateAdd and formatDate.
 

Code

Readable format
if(formatDate(prop("Date"), "M/D/Y") == formatDate(now(), "M/D/Y"),
true,
if(formatDate(prop("Date"), "M/D/Y") == formatDate(dateAdd(now(), 1, "days"), "M/D/Y"),
true,
if(formatDate(prop("Date"), "M/D/Y") == formatDate(dateAdd(now(), 2, "days"), "M/D/Y"),
true,
false)))
 
Usable format
if(formatDate(prop("Date"), "M/D/Y") == formatDate(now(), "M/D/Y"), true, if(formatDate(prop("Date"), "M/D/Y") == formatDate(dateAdd(now(), 1, "days"), "M/D/Y"), true, if(formatDate(prop("Date"), "M/D/Y") == formatDate(dateAdd(now(), 2, "days"), "M/D/Y"), true, false)))
 

This is the sample database with the dates and the formula.

notion image
 

Use this filter

notion image
 
notion image
 

Duplicate the Template

 
Sticky Block
  #block-d2fc3cb4c8ff4e5c821abb4cd18327d2 {
    position: sticky !important;
    top: 60px !important;
  }