function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
rornelasrornelas 

use smart dates for future dates

Hi All,

I'm working with this formula below, it works great for past dates but need to have somethign to help me with dates in the future (i.e. for task that were made in the future). Not sure if the today function needs to change or if I need to add something to.
 
IF(TODAY() - LastActivityDate = 0, "Today",
IF(TODAY() - LastActivityDate <= 30, "Last 30 Days",
IF(TODAY() - LastActivityDate <= 60, "Last 60 Days",
IF(TODAY() - LastActivityDate <= 90, "Last 90 Days",
IF(TODAY() - LastActivityDate <= 180, "Last 180 Days",
IF(TODAY() - LastActivityDate <= 360, "Last 360 Days",
IF(TODAY() - LastActivityDate > 360, "Over a year", "No Activity"
)))))))

 
krishnak2krishnak2
Have you tried TODAY() - LastActivityDate = -30, "Next 30 days"?