On occasion, you may need to compare or evaluate two values based on time as well as a calendar date, specifically any time under a 24-hour period (and therefore not equal to a full day). The process detailed below is an example of a timespan comparison that I created.
In this scenario, we will compare two dates that contain a time value - one representing the log in time of the user, and the other representing a due date/time. This can be utilized for various tasks or response actions.
For instance, you may need to respond to a particular request within 2 hours of the due date/time. The logic in this workflow can be applied in an auto start process that will send you a notification email warning you of the approaching deadline.
For this example, we will create a simple web form project that will provide a true/false value based on whether or not the current time is within 2 hours of the deadline/due date.
Click to view.
Your primary model should now look something like this:
When this project is run, you will see the form that corresponds to whether or not the current time is greater than your designated due date, minus two hours.