PLAT-ADMN-202 practice question 28 of 35
The Director of Marketing at Northern Trail Outfitters wants the app builder to create a formula field that tracks how many days have elapsed since a contact was sent a marketing communication. The director is only interested in whole units. Which function should be used to return a date for calculating the difference?
Full set: 311 questionsDomain Sales and Marketing Applications
To calculate the number of elapsed days in whole units, the formula needs to subtract a past date from the current date. The TODAY() function returns the current date as a Date data type, without any time component. Using TODAY() in a formula such as TODAY() - MarketingCommunicationDatec will result in a number representing the difference in whole days, directly fulfilling the requirement.
A. DATETIMEVALUE(): This function converts a text or date expression into a DateTime data type. It does not return the current date and is used for data type conversion.
C. DATEVALUE(): This function converts a DateTime or text expression into a Date data type, stripping the time component. It is used for conversion, not for retrieving the current date.
D. NOW(): This function returns the current date and time as a DateTime data type. Using it for this calculation would result in a fractional number, which contradicts the requirement for whole units.
1. Salesforce Help Documentation, "Formula Operators and Functions I–Z":
TODAY(): "Returns the current date as a date data type." This aligns with the need for a date-only value to calculate whole days.
NOW(): "Returns a datetime value representing the current moment." The inclusion of time makes it unsuitable for calculating whole days without additional functions.
DATEVALUE(expression): "Returns a date value from a date/time or text expression." This describes a conversion function, not one that provides the current date.
DATETIMEVALUE(expression): "Returns a year, month, day, and GMT time value." This also describes a conversion function.
2. Salesforce Trailhead, "Use Formula Fields" Module, "Use Basic Logic in Checkbox Formulas" Unit:
This unit provides examples of date formulas. It implicitly distinguishes between TODAY() for date-only calculations and NOW() for date-and-time calculations, reinforcing that TODAY() is the correct choice for calculating the number of days. For example, IF(CloseDate < TODAY(), 1, 0) evaluates based on the current date.
Keep practicing
Take the free PLAT-ADMN-202 practice test
Ten exam-style questions with answers and explanations, plus the exam facts and study guides.
More questions
Other PLAT-ADMN-202 practice questions
- Question 1Universal Containers manages leads in a Lead qualification queue where sales reps can acc…
- Question 2Ursa Major Solar wants to see the Type field from the parent object Galaxy listed on the …
- Question 3Universal Containers (UC) utilizes two custom picklist fields called sales_Organization__…
- Question 4Which two features can be used to allow users to access Flows? Choose 2 answers
- Question 5Universal Containers wants some enhancements on its Opportunity page layout to improve ef…
- Question 6A business user wants a quick way to edit a record's status and enter a custom due date f…
