Is there a way to compare dates in a formula in Workato?
Assuming expiration_date is a Date field the formula will work as follows
expiration_date > now ? “Expired” : “Active”
The formula mode supports 'now' and 'today' which return time and date at the time of invocation.
If the expiration_date is a string, then convert the string to time.
expiration_date.to_time > now ? “Expired” : “Active”
This will work assuming string is in 2015-07-09 11:31:58 -0700 format.
If the string is in custom format, then do the following:
expiration_date.to_time(format: 'MM/DD/YYYY') > now ? “Expired” : “Active”