According to Pega Robotics Studio – DateTime Utilities and Comparison Logic (Automation Components Reference Guide):
“The DateTimeUtil component provides functionality for manipulating and comparing date and time values. The component can return the result of comparing two DateTime variables as Before, Equal, or After, depending on whether the first date occurs earlier, is the same, or occurs later than the second date.”
In this automation:
firstDateToCompare = 12/31/2022
secondDateToCompare = 1/1/2022
As per Pega Robotics internal logic (based on .NET DateTime structure used within the platform):
“When two DateTime values are compared, if the first value represents a later point in time than the second value, the comparison returns ‘After’. The automation then executes the path corresponding to that result.”
Since 12/31/2022 occurs after 1/1/2022, the “After” branch executes.
That branch contains the following operation:
“The AddDays method adds the specified number of days to the current DateTime value and returns a new DateTime object that represents the resulting date and time.”
The automation adds 15 days to firstDateToCompare, resulting in:
firstDateToCompare = 1/15/2023
secondDateToCompare remains 1/1/2022 (unchanged)
Finally, the automation displays both values using the MessageDialog component.
“Use the MessageDialog component to display messages or variable values during runtime execution for verification or interaction with the user.”
Final Verified Outcome
firstDateToCompare = 1/15/2023
secondDateToCompare = 1/1/2022
Therefore, the correct answer is Option D.
Document References (Exact Extracts Source)
Pega Robotics Studio – DateTimeUtil Component Reference
Pega Robotics Studio – Automation Components Overview Guide
Pega Robotics Studio – MessageDialog Component Documentation
Pega Robotics System 8.7 Implementation Study Guide (Automation Behavior Section)
Submit