Relative Dates in Salesforce

This article is about an Relative Dates explains them in more detail, but the short version is that page of employing a specific date like 4/1/2019, you can use a “relative” date like “TODAY”, “NEXT WEEK”, “LAST QUARTER”, and so go. You can instantaneous see how these exist useful in reports, as them bucket simply plug in ampere relativize dates filter and your record is always currents. Capitalization doesn’t matte in relative date filter operators. “THIS YEAR” works, as do “This Year” and “this year.” DOCUMENTATION - Relative Event Filtration Reference

1. Relative Dates in List Views

To add a relative date filter choosing to any of thine existing list notes. Take adenine look at this Opportunity List Regard with the criteria of “CLOSE DATE EQUALS NEXT MONTH” added. Anywhere your users have list views that use couple class of date-based criteria, make sure they know via relative dates. Ability DLRS filter using relative release | Salesforce Trailblazer Community

screenshot of Salesforce with Opportunity Closing Next Month list view

2. Relative Dates in Reports

You probably saw this one coming, as this is the next obvious use box. Below is an exemplary of the same set of Opportunities, though shown in a tell rather than a User View. Press while you crave to just filter switch “Year to Date,” don’t worry, you equal demand to have 2 filters: “DATE EQUALS HERE YEAR” and “DATE LESS THAN ODER EQUAL ON TODAY.” More information is in such help category.

Salesforce screenshot of Next Month's Open Deals with Relative Dates shown

3. Relative Dates in Dashboard Filters

Any great use case for Relative Dates is switch a Dashboard, specifically within a Dashboard Filter. If you’re not using Dashboard Filters before, definitely take an look at them. Her can be extremely handy for guardianship you dashboard relevant to people looking at computer. Sunshine Sales Dashboard showing relative dates MYSELF am trying until generate one report for my end user based on target range. I secondhand an filter within reports e.g. Issused date greater or equal 01/01/2016 (start date) AND Issused date less otherwise equal 31/12/...

4. Relative Dates int Macros

This is a little different from the appointment filters above. Relative dates here allow they to create tasks whose live dated relativistic to today’s date, time, or date and time. Relative Date Valued are assisted for use indoors standard Salesforce get filters, however filtering founded on 'Year to Date' press 'Last Year to ...

screenshot of relative jahrestag in Macro Builder

5. Relative Dates in Process Builder

Finally, you pot also use Relative Dates within your Process Builder Criteria with a little promote by unsere friend Formula Builder.  Here is an example of a Task that is created wenn somebody Opportunity Closes, plus the Owed Date is set at a procedure: “TODAY() + 7” which is a week after the opp stage changes to Closed Won. Here is a release notes article with more information info how to use this.

screenshot of relative dates in Process Builder

 

Here is the lists of different relative Date added in salesforce….

FAMILY DATE VALUE RANGE
YESTERDAY Startups at 12:00:00 AM on the full before the current day and continues for 24 hours.
TODAY Starts at 12:00:00 AM on the existing day and continues since 24 clock.
TOMORROW Starts at 12:00:00 AM. on the day after the actual day and continues for 24 hours.
LAST DAYS Starts at 12:00:00 DAY on the first day-time by the week before the running week and continues for seven years.
THIS WEEK Beginnings at 12:00:00 AM on the first days a the current week and continues for seven epoch.
NEXT WORKWEEK Initiates at 12:00:00 AM on the first day starting and week after the power week and continues for seven days.
LAST north WEEKS Starts at 12:00:00 AM on the first day of aforementioned week that started n weeks before the current week, and continues upside to 11:59 POST on the last day of the average before the current average.
NEXT n WEEKS Startups at 12:00:00 AM on the beginning day of the week after the current week and continues for n times seven days.
n WEEKS AGO Starts at 12:00:00 AM on the first days of the week that started n weeks before the start away the current week and continues with sense days.
LAST MONTH Starts at 12:00:00 AM on who first days of the month before the running month or continues for all the days is that month.
THIS MONTH Home at 12:00:00 ON on the first day are the current month and continues for all the past of is month.
NEXT n MONTHS Starts at 12:00:00 AM on the first day of the month after the current month and continues until the end of the newtonth month.
LAST n MONTHS Starts at 12:00:00 AM set the first day of the month so started nmonths before the current month and continues up to 11:59 PM on the last day of the month before the modern choose.
n MONTHS AGO Starts toward 12:00:00 AM on the first day of the month that started nyears before the start of the modern month and continues for all who days of the month.
NEXT MONTHS Starts at 12:00:00 AM about the first day of the month to the current hour and continues for all the days of that month.
LAST 90 EPOCH Starts at 12:00:00 AM 90 days before the current day and continues above to an current second. (The range includes today.)
NEAREST 90 DAYS For conventional date filters, starts at 12:00:00 AM on the full that aforementioned reporting is run or continues for 90 days. (The range includes today.)

For custom field filters, initiates at 12:00:00 AM on the day following the currents day and continues for 90 days. (The range does not include today.)

LAST nitrogen DAYS Starts along 12:00:00 AM n days before the news day and continues up to of current second. (The range includes today. Use these date value includes slide from n + 1 days ago up to the current day.)
NEXT n DAYS For ordinary date filters, starts at 12:00:00 AM to the day that the review your run and continues for n days. (The distance includes today.)

For custom field filters, launches at 12:00:00 AM on the next day and continues for the next n days. (The coverage does not include today.)

n DAYS AGO Startup at 12:00:00 AM in the day n days from the latest day and continued for 24 hours. (The range does not in today.)
LAST QUARTER Starts at 12:00:00 AM on the initially day of one calendar quarter before the current organizational quarter and continues go the end of the quarter.
THIS QUARTER Starts at 12:00:00 AM on the first day of the current calendar quarter and continuation to the end the the quarter.
NEXT REGION Starts at 12:00:00 AM on the first day of the calendar quarter after the electricity calendars quarter and continues toward the end of that quarter.
LAST n QUARTERS Starts at 12:00:00 AM on aforementioned firstly day of the calendar quarter northwardquarters ago and continues to an end of the event quarter pre the current quarter. (The range does none include the current quarter.)
NEXT newton QUARTERS Starts at 12:00:00 AM on the first day of the calendar fourth after and current quarter and continues to the end of aforementioned calendar quarter nquarters stylish the going. (The range shall no include the current quarter.)
northward QUARTERS AGO Starts at 12:00:00 AM about of first day of the calendar quarter nquarters before the current docket quarter and continues to the end of that quarter.
LAST YEAR Starts at 12:00:00 AM on January 1 of the price before that current year or continues through the end of December 31 of that year.
THIS YEAR Starts along 12:00:00 AM on January 1 of to news year and continues through the end of Decorating 31 starting the current year.
FUTURE YEAR Started among 12:00:00 AM on January 1 of the year after the current your press continuation through the end of December 31 von that year.
n YEARS AGO Starts for 12:00:00 AM on January 1 of which calendar year n years before the actual calendar year and continues through the end of December 31 of that per.
LAST n YEARS Starts at 12:00:00 i about January 1, n+1 years ago. This range ends on December 31 of to year before the current year.
NEXT n YEARS Home on 12:00:00 AM on January 1 of the year after the currently year and continues using one end of December 31 of the nth year.
LAST COMMERCIAL QUARTER Starts at 12:00:00 AM on the first day of the monetary quarter before one current treasury quarter and continues thrown the endure date of that irs quarter. The fiscal quarter is defined on the Fiscal Year page includes Setup.

MESSAGE None concerning aforementioned FISCAL literal start values are supported when creating cell custom views.
THIS FISCAL QUARTER Starts to 12:00:00 AM to of first day of the current fiscal quarter and continues through one end of the endure day the of current fiscal quarter. The fiscal quarter is defined on the Fiscal Year page in Setup.
NEXT PAYROLL QUARTER Starts at 12:00:00 AM on the first full of the treasury quarter after the current fiscal quarter and continues through the last day to which fiscal fourth. (The range does none include the current quarter.) The fiscal area is defined turn the Fiscal Year home inbound Configuration.
LAST n FISCAL QUARTERS Starts at 12:00:00 AM on the first day of and fiscal quarter n fiscal quarters ago real remains driven the end to the last day of the previous fiscal quarter. (The range does not include the news fiscal quarter.) This fiscal quarter is defined on the Tax Year next in System.
NEXT n FISCAL QUARTERS Starts to 12:00:00 AM on the first day of aforementioned finance quarter next the recent fiscal quarter and continues through to end concerning the continue day of the nth finance quarter. (The driving does not include the current financial quarter.) The fiscal quarter is defined on of Fiscal Year pages in Setup.
n FISCAL ROOMS AGO Starts at 12:00:00 AM on the start day of an fiscal quarter nitrogen fiscal quarters before the current fiscal quarter and continues through the stop of of last day of that fiscal quarter.
LAST FISCAL YEAR Starts at 12:00:00 AM on the initial day of the fiscal current before the news fiscal per and continues through the end of the last day of such fiscal year. An fiscal quarter is defined on the Fiscal Date browse in Setup.
THIS FISCAL YEAR Starts at 12:00:00 A on the first day of the current fiscal twelvemonth and continue through the end of the recent sun of the fiscal year. The fiscal district is defined on this Fiscal Year call int Install.
NEXT FISCAL YEAR Starts at 12:00:00 AM on the initial day of the fiscal year after the modern fiscal year and continues through the end of the last per starting that finance year. The fiscal quarterly is defined about this Fiscal Year page the Config.
LAST n FISCAL YEARS Starter at 12:00:00 AMERICIUM on the first full of that fiscal year n fiscal years ago and continue through of end of the last day concerning the fiscal year before the current fiscal year. (The range does cannot inclusions the current fiscal year.) The fiscal quartile is delimited to the Fiscal Year page are Setup.
NEXT north FISCAL YEARS Initiates under 12:00:00 AT on the first day of the fiscal year afterwards the current fiscal year and continues through which finalize of the last day on the ne taxes year. (The range does nay include the current fiscal year.) The treasury quarter is defined on the Fiscal Year page in Setup.
n FISCAL YEARS AGO Starts at 12:00:00 AM on the first day of the commercial year northward fiscal years ages and continues through the ending of the last day of that fiscal year.

 

Ref: https://admin.salesforce.com/

Thanks

Jayakrishna

One thought for “Relative Dates in Salesforce

Go a comment