Need to write a condition on subtracting dates.
Here is the Usecase:
While uploading the document we will define the metadata expiry_date ex.“2023-05-10”, we need a condition that will check the current_date and expiry_date if current_date > expiry_date we need to a add tag called expired. but we don’t know how to write conditions using Django-built template tags and filters
{# grab the current date and time string #}
{% now "h:m m-d-y" as date_time_string %}
{# convert the date time string into a date object #}
{% set date_time_string|date_parse as now_date_object %}
{# convert the metadata expiration date string into a date object #}
{% set document.metadata_values_of.expiry_date|date_parse as expiration_date_object %}
{% if now_date_object > expiration_date_object %}
True
{% endif %}
I tried with the above condition that has been provided, but I end with an error
Basically, we are adding a tag to the document on a state is exits with expiry condition
step1: we create workflow->state->action->condition